point3.sub

The vector from point b to point a.

Value helperSince 0.3.0

Usage

TypeScript
Point3.sub(a: Point3, b: Point3): Vector3

Parameters

  • aPoint3

    The point the vector ends at. Required. In model.

  • bPoint3

    The point the vector starts from. Required. In model.

Returns

The vector a − b; NaN when a coordinate is NaN or two infinities cancel.

Example

TypeScript
Point3.sub(Point3.of(4, 5, 6), Point3.of(1, 1, 1)) // → { x: 3, y: 4, z: 5 }

See also