@lakuna/umath
    Preparing search index...

    Function perspective

    • Create a perspective projection matrix with the given bounds such that the near and far clip planes correspond to a normalized device coordinate Z range of [-1, 1] (OpenGL/WebGL).

      Type Parameters

      Parameters

      • fov: number

        The vertical field of view in radians.

      • aspect: number

        The aspect ratio (typically the width of the viewport divided by its height).

      • near: number

        The near bound of the frustum. Must be strictly positive.

      • far: number

        The far bound of the frustum.

      • out: T

        The matrix to store the result in.

      Returns T

      The perspective projection matrix.