Skip to content

vec3Perpendicular

vec3Perpendicular(v): Vec3

Defined in: math-linear/src/vec3.ts:284

Computes a vector that is perpendicular to the given 3D vector. The result is not unique; this function returns one of the possible perpendicular vectors.

The returned vector is guaranteed to be perpendicular to the input vector, but its direction is arbitrary. If the input vector is a zero vector, the function will throw an error.

Vec3

Vec3