diff --git a/include/Spectre/Math/Matrix3.h b/include/Spectre/Math/Matrix3.h index f0117b0..b5328e9 100644 --- a/include/Spectre/Math/Matrix3.h +++ b/include/Spectre/Math/Matrix3.h @@ -10,16 +10,18 @@ template struct Matrix3 { - /* Column-major order are used for the matrices here to be compatible with OpenGL. - _ _ - | | - | 0 3 6 | - | 1 4 7 | - | 2 5 8 | - |_ _| - */ + // Column-major order are used for the matrices here to be compatible with OpenGL. union { T m[3][3]; // format: [col][row] + + /* Indicies to use for accessing elements. + _ _ + | | + | 0 3 6 | + | 1 4 7 | + | 2 5 8 | + |_ _| + */ T v[9]; }; @@ -27,6 +29,7 @@ struct Matrix3 inline Matrix3(); + inline Matrix3( T a, T b, T c, T d, T e, T f, T g, T h, T i);