matrix4x4to3x3

Converts 4x4 matrix to 3x3 matrix. 3x3 matrix defaults to identity

Matrix!(T, 3)
matrix4x4to3x3
(
T
)
(
Matrix!(T, 4) m
)

Examples

Matrix4f m1 = matrixf(
    1, 0, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1
);
Matrix3f m2 = matrix4x4to3x3(m1);
assert(m2 == matrixf(
    1, 0, 0,
    0, 1, 0,
    0, 0, 1)
);

Meta