pub fn perspective(fov: T, aspect: T, near: T, far: T) -> Mat4<T> {
        let two = T::ONE + T::ONE;
        let top = (fov / two).to_radians().tan() * near;
        let right = top * aspect;
        Mat4 {
            a11: near / right,
            a22: near / top,
            a33: -(far + near) / (far - near),
            a34: (-two*far*near) / (far - near),
            a43: -T::ONE,
            .. Mat4::ZERO
        }
    }
/// Creates a new perspective projection matrix. `fov` is the vertical field of view and should
/// be in degrees.
Creates a new perspective projection matrix. `fov` is the vertical field of view and should
be in degrees.
Creates a new perspective projection matrix . ` fov ` is the vertical field of view and should be in degrees .
pub fn perspective(fov: T, aspect: T, near: T, far: T) -> Mat4<T> {
        let two = T::ONE + T::ONE;
        let top = (fov / two).to_radians().tan() * near;
        let right = top * aspect;
        Mat4 {
            a11: near / right,
            a22: near / top,
            a33: -(far + near) / (far - near),
            a34: (-two*far*near) / (far - near),
            a43: -T::ONE,
            .. Mat4::ZERO
        }
    }
pub fn perspective ( fov : T , aspect : T , near : T , far : T ) -> Mat4 < T > { let two = T :: ONE + T :: ONE ; let top = ( fov / two ) . to_radians ( ) . tan ( ) * near ; let right = top * aspect ; Mat4 { a11 : near / right , a22 : near / top , a33 : - ( far + near ) / ( far - near ) , a34 : ( - two * far * near ) / ( far - near ) , a43 : - T :: ONE , .. Mat4 :: ZERO } }
Creates a new perspective projection matrix.
Creates a new perspective projection matrix .
fov
T
aspect
T
near
T
far
T
fov
T
aspect
T
near
T
far
T