API

Function normalizeVec3TupleOrUp

  • Normalizes the vector (x, y, z) to unit length.

    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 below epsilon.