Documentation / @interstellar-tools/equations / dot
Function: dot()
ts
function dot(a: Vector3DTupleType, b: Vector3DTupleType): number;Defined in: helpers/misc.ts:85
Compute the dot product of two 3D vectors.
Parameters
| Parameter | Type | Description |
|---|---|---|
a | Vector3DTupleType | First vector. |
b | Vector3DTupleType | Second vector. |
Returns
number
Dot product (units: product of the input component units).
Example
ts
dot([1, 2, 3], [4, 5, 6]); // 32