getOrthogonalVector

wv.getOrthogonalVector()
getOrthogonalVector(v: IPoint3): IPoint3

Computes an orthogonal vector to the given 3D vector.

Parameters

v: IPoint3

The input vector for which to find an orthogonal vector.

Returns: IPoint3

An orthogonal vector to the input vector.

Examples

const v = { x: 1, y: 0, z: 0 };
const orthogonal = getOrthogonalVector(v);
console.log(orthogonal); // { x: 0, y: 1, z: 0 }

Throws

Will throw an error if the input vector is a zero vector.