Documentation / @interstellar-tools/equations / norm
Function: norm()
ts
function norm(v: Vector3DTupleType): number;Defined in: helpers/misc.ts:22
Compute the Euclidean norm (length / magnitude) of a 3D vector.
Uses Math.hypot for numerical stability.
Parameters
| Parameter | Type | Description |
|---|---|---|
v | Vector3DTupleType | 3D vector [x, y, z]. |
Returns
number
Vector magnitude (same units as the components of v).
Example
ts
norm([3, 4, 12]); // 13