math docs
    Preparing search index...

    Function perpendicular

    • Calculates a normalized perpendicular vector to the given vector. Useful for finding an arbitrary orthogonal basis vector.

      The zero vector has no unique perpendicular - every direction qualifies - so it returns the X axis rather than NaN.

      Parameters

      • out: vec3.Vec3

        the receiving vector

      • a: readonly [number, number, number]

        the source vector

      Returns vec3.Vec3

      the out vector