Documentation / @interstellar-tools/equations / cross
Function: cross()
ts
function cross(a: Vector3DTupleType, b: Vector3DTupleType): Vector3DTupleType;Defined in: helpers/misc.ts:106
Compute the cross product of two 3D vectors.
Parameters
| Parameter | Type | Description |
|---|---|---|
a | Vector3DTupleType | First vector. |
b | Vector3DTupleType | Second vector. |
Returns
Cross product, perpendicular to both (units: product of the input component units).
Example
ts
cross([1, 0, 0], [0, 1, 0]); // [0, 0, 1]