getOrthogonalVector
-
wv.getOrthogonalVector() -
Computes an orthogonal vector to the given 3D vector.
Parameters
v:
IPoint3The input vector for which to find an orthogonal vector.Returns:
IPoint3An 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.