pub fn mat4_det<T>(mat: Matrix4<T>) -> T
    where T: Copy + Add<T, Output = T> + Mul<T, Output = T> + Sub<T, Output = T>
{
      mat[0][0] * mat[1][1] * mat[2][2] * mat[3][3]
    + mat[0][0] * mat[1][2] * mat[2][3] * mat[3][1]
    + mat[0][0] * mat[1][3] * mat[2][1] * mat[3][2]

    + mat[0][1] * mat[1][0] * mat[2][3] * mat[3][2]
    + mat[0][1] * mat[1][2] * mat[2][0] * mat[3][3]
    + mat[0][1] * mat[1][3] * mat[2][2] * mat[3][0]

    + mat[0][2] * mat[1][0] * mat[2][1] * mat[3][3]
    + mat[0][2] * mat[1][1] * mat[2][3] * mat[3][0]
    + mat[0][2] * mat[1][3] * mat[2][0] * mat[3][1]

    + mat[0][3] * mat[1][0] * mat[2][2] * mat[3][1]
    + mat[0][3] * mat[1][1] * mat[2][0] * mat[3][2]
    + mat[0][3] * mat[1][2] * mat[2][1] * mat[3][0]

    - mat[0][0] * mat[1][1] * mat[2][3] * mat[3][2]
    - mat[0][0] * mat[1][2] * mat[2][1] * mat[3][3]
    - mat[0][0] * mat[1][3] * mat[2][2] * mat[3][1]

    - mat[0][1] * mat[1][0] * mat[2][2] * mat[3][3]
    - mat[0][1] * mat[1][2] * mat[2][3] * mat[3][0]
    - mat[0][1] * mat[1][3] * mat[2][0] * mat[3][2]

    - mat[0][2] * mat[1][0] * mat[2][3] * mat[3][1]
    - mat[0][2] * mat[1][1] * mat[2][0] * mat[3][3]
    - mat[0][2] * mat[1][3] * mat[2][1] * mat[3][0]

    - mat[0][3] * mat[1][0] * mat[2][1] * mat[3][2]
    - mat[0][3] * mat[1][1] * mat[2][2] * mat[3][0]
    - mat[0][3] * mat[1][2] * mat[2][0] * mat[3][1]
}
/// Computes the determinant of a 4x4 matrix.
Computes the determinant of a 4x4 matrix.
Computes the determinant of a 4x4 matrix .
pub fn mat4_det<T>(mat: Matrix4<T>) -> T
    where T: Copy + Add<T, Output = T> + Mul<T, Output = T> + Sub<T, Output = T>
{
      mat[0][0] * mat[1][1] * mat[2][2] * mat[3][3]
    + mat[0][0] * mat[1][2] * mat[2][3] * mat[3][1]
    + mat[0][0] * mat[1][3] * mat[2][1] * mat[3][2]
    + mat[0][1] * mat[1][0] * mat[2][3] * mat[3][2]
    + mat[0][1] * mat[1][2] * mat[2][0] * mat[3][3]
    + mat[0][1] * mat[1][3] * mat[2][2] * mat[3][0]
    + mat[0][2] * mat[1][0] * mat[2][1] * mat[3][3]
    + mat[0][2] * mat[1][1] * mat[2][3] * mat[3][0]
    + mat[0][2] * mat[1][3] * mat[2][0] * mat[3][1]
    + mat[0][3] * mat[1][0] * mat[2][2] * mat[3][1]
    + mat[0][3] * mat[1][1] * mat[2][0] * mat[3][2]
    + mat[0][3] * mat[1][2] * mat[2][1] * mat[3][0]
    - mat[0][0] * mat[1][1] * mat[2][3] * mat[3][2]
    - mat[0][0] * mat[1][2] * mat[2][1] * mat[3][3]
    - mat[0][0] * mat[1][3] * mat[2][2] * mat[3][1]
    - mat[0][1] * mat[1][0] * mat[2][2] * mat[3][3]
    - mat[0][1] * mat[1][2] * mat[2][3] * mat[3][0]
    - mat[0][1] * mat[1][3] * mat[2][0] * mat[3][2]
    - mat[0][2] * mat[1][0] * mat[2][3] * mat[3][1]
    - mat[0][2] * mat[1][1] * mat[2][0] * mat[3][3]
    - mat[0][2] * mat[1][3] * mat[2][1] * mat[3][0]
    - mat[0][3] * mat[1][0] * mat[2][1] * mat[3][2]
    - mat[0][3] * mat[1][1] * mat[2][2] * mat[3][0]
    - mat[0][3] * mat[1][2] * mat[2][0] * mat[3][1]
}
pub fn mat4_det < T > ( mat : Matrix4 < T > ) -> T where T : Copy + Add < T , Output = T > + Mul < T , Output = T > + Sub < T , Output = T > { mat [ 0 ] [ 0 ] * mat [ 1 ] [ 1 ] * mat [ 2 ] [ 2 ] * mat [ 3 ] [ 3 ] + mat [ 0 ] [ 0 ] * mat [ 1 ] [ 2 ] * mat [ 2 ] [ 3 ] * mat [ 3 ] [ 1 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[ 0 ] [ 1 ] * mat [ 1 ] [ 3 ] * mat [ 2 ] [ 0 ] * mat [ 3 ] [ 2 ] - mat [ 0 ] [ 2 ] * mat [ 1 ] [ 0 ] * mat [ 2 ] [ 3 ] * mat [ 3 ] [ 1 ] - mat [ 0 ] [ 2 ] * mat [ 1 ] [ 1 ] * mat [ 2 ] [ 0 ] * mat [ 3 ] [ 3 ] - mat [ 0 ] [ 2 ] * mat [ 1 ] [ 3 ] * mat [ 2 ] [ 1 ] * mat [ 3 ] [ 0 ] - mat [ 0 ] [ 3 ] * mat [ 1 ] [ 0 ] * mat [ 2 ] [ 1 ] * mat [ 3 ] [ 2 ] - mat [ 0 ] [ 3 ] * mat [ 1 ] [ 1 ] * mat [ 2 ] [ 2 ] * mat [ 3 ] [ 0 ] - mat [ 0 ] [ 3 ] * mat [ 1 ] [ 2 ] * mat [ 2 ] [ 0 ] * mat [ 3 ] [ 1 ] }
Computes the determinant of a 4x4 matrix.
Computes the determinant of a 4x4 matrix .
mat
Matrix4<T>
mat
Matrix4<T>