vector3.add

The sum of two vectors.

Value helperSince 0.3.0

Usage

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

Parameters

  • aVector3

    First vector. Required. In model.

  • bVector3

    Second vector. Required. In model.

Returns

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

Use instead

  • point3.add: moving a point by a vector, so the name says which is which

Example

TypeScript
Vector3.add(Vector3.xAxis, Vector3.yAxis) // → { x: 1, y: 1, z: 0 }

See also