vector3.sub

The difference a − b of two vectors.

Value helperSince 0.3.0

Usage

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

Parameters

  • aVector3

    The vector to subtract from. Required. In model.

  • bVector3

    The vector subtracted. Required. In model.

Returns

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

Use instead

Example

TypeScript
Vector3.sub(Vector3.of(3, 2, 1), Vector3.xAxis) // → { x: 2, y: 2, z: 1 }

See also