vector3.cross

The cross product a × b, perpendicular to both by the right-hand rule.

Value helperSince 0.3.0

Usage

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

Parameters

  • aVector3

    First vector. Required. In model.

  • bVector3

    Second vector. Required. In model.

Returns

A vector of length |a| |b| sin θ perpendicular to both; the zero vector when they are parallel or either is zero; NaN components for non-finite input.

Example

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

See also