Mat3

3x3 float matrix (mat3 in GLSL)

The matrix can be constructed from an array with 3x3 elements, aligned in column-major order. For example,a translation by (x, y) looks as follows:

1 float[9] array =
2 [
3    1, 0, 0,
4    0, 1, 0,
5    x, y, 1
6 ];
7 
8 auto matrix = Mat3(array);

$(PARA Mat4 can also be converted from a $(TRANSFORM_LINK Transform).)

Transform transform;
auto matrix = Mat3(transform);
alias Mat3 = Matrix!(3, 3)

Meta