pub fn ortho(left: T, right: T, top: T, bottom: T, near: T, far: T) -> Mat4<T> {
        let two = T::ONE + T::ONE;
        let a11 = two / (right-left);
        let a22 = two / (top-bottom);
        let a33 = two / (near-far);

        let a14 = T::ZERO - ((right+left) / (right-left));
        let a24 = T::ZERO - ((top+bottom) / (top-bottom));
        let a34 = T::ZERO - ((far+near) / (far - near));

        Mat4 {
            a11, a22, a33,
            a14, a24, a34,
            .. Mat4::IDENTITY
        }
    }
/// Creates a new orthographic projection matrix.
Creates a new orthographic projection matrix.
Creates a new orthographic projection matrix .
pub fn ortho(left: T, right: T, top: T, bottom: T, near: T, far: T) -> Mat4<T> {
        let two = T::ONE + T::ONE;
        let a11 = two / (right-left);
        let a22 = two / (top-bottom);
        let a33 = two / (near-far);
        let a14 = T::ZERO - ((right+left) / (right-left));
        let a24 = T::ZERO - ((top+bottom) / (top-bottom));
        let a34 = T::ZERO - ((far+near) / (far - near));
        Mat4 {
            a11, a22, a33,
            a14, a24, a34,
            .. Mat4::IDENTITY
        }
    }
pub fn ortho ( left : T , right : T , top : T , bottom : T , near : T , far : T ) -> Mat4 < T > { let two = T :: ONE + T :: ONE ; let a11 = two / ( right - left ) ; let a22 = two / ( top - bottom ) ; let a33 = two / ( near - far ) ; let a14 = T :: ZERO - ( ( right + left ) / ( right - left ) ) ; let a24 = T :: ZERO - ( ( top + bottom ) / ( top - bottom ) ) ; let a34 = T :: ZERO - ( ( far + near ) / ( far - near ) ) ; Mat4 { a11 , a22 , a33 , a14 , a24 , a34 , .. Mat4 :: IDENTITY } }
Creates a new orthographic projection matrix.
Creates a new orthographic projection matrix .
left
T
right
T
top
T
bottom
T
near
T
far
T
left
T
right
T
top
T
bottom
T
near
T
far
T