Function normalizeVec3TupleOrUp
-
Parameters
- x: number
X component.
- y: number
Y component.
- z: number
Z component.
- epsilon: number = 1e-10
Length threshold below which the vector is treated as degenerate.
Returns Vec3Tuple
The unit-length vector, or
[0, 1, 0]if the input length is at or belowepsilon. - x: number
Normalizes the vector
(x, y, z)to unit length.