Presently, vec<T,M> is only defined for M equal to 2, 3, or 4, and mat<T,M,N> is only defined for M and N equal to 2, 3, or 4. This is mainly to allow for the presence of member variables x, y, z, and w when appropriate, and to allow for construction using the {x,y,z} syntax.
Should we also provide a general implementation of vec and mat which would handle sizes greater than four? These could simply use a backing array (or perhaps std::array). They would not support element access with .x, .y, etc., but would support access by array index, as well as all other functions and operators.
Presently,
vec<T,M>is only defined forMequal to 2, 3, or 4, andmat<T,M,N>is only defined forMandNequal to 2, 3, or 4. This is mainly to allow for the presence of member variablesx,y,z, andwwhen appropriate, and to allow for construction using the{x,y,z}syntax.Should we also provide a general implementation of
vecandmatwhich would handle sizes greater than four? These could simply use a backing array (or perhaps std::array). They would not support element access with.x,.y, etc., but would support access by array index, as well as all other functions and operators.