Skip to content

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.

a⋅b=axbx+ayby+azbz

Parameters ​

ParameterTypeDescription
aVector3DTupleTypeFirst vector.
bVector3DTupleTypeSecond vector.

Returns ​

number

Dot product (units: product of the input component units).

Example ​

ts
dot([1, 2, 3], [4, 5, 6]); // 32