Browse Source

matrix type Parameterize on dimensions #584

Christophe Riccio 9 years ago
parent
commit
b92fdf5a59
84 changed files with 2198 additions and 2208 deletions
  1. 9 9
      glm/detail/func_matrix.hpp
  2. 60 60
      glm/detail/func_matrix.inl
  3. 17 17
      glm/detail/func_matrix_simd.inl
  4. 54 54
      glm/detail/glm.cpp
  5. 4 1
      glm/detail/precision.hpp
  6. 72 83
      glm/detail/type_mat.hpp
  7. 58 58
      glm/detail/type_mat2x2.hpp
  8. 77 77
      glm/detail/type_mat2x2.inl
  9. 51 51
      glm/detail/type_mat2x3.hpp
  10. 69 69
      glm/detail/type_mat2x3.inl
  11. 51 51
      glm/detail/type_mat2x4.hpp
  12. 65 65
      glm/detail/type_mat2x4.inl
  13. 51 51
      glm/detail/type_mat3x2.hpp
  14. 65 65
      glm/detail/type_mat3x2.inl
  15. 58 58
      glm/detail/type_mat3x3.hpp
  16. 75 75
      glm/detail/type_mat3x3.inl
  17. 51 51
      glm/detail/type_mat3x4.hpp
  18. 69 69
      glm/detail/type_mat3x4.inl
  19. 51 51
      glm/detail/type_mat4x2.hpp
  20. 65 65
      glm/detail/type_mat4x2.inl
  21. 51 51
      glm/detail/type_mat4x3.hpp
  22. 69 69
      glm/detail/type_mat4x3.inl
  23. 66 66
      glm/detail/type_mat4x4.hpp
  24. 100 100
      glm/detail/type_mat4x4.inl
  25. 0 2
      glm/detail/type_vec.hpp
  26. 81 81
      glm/fwd.hpp
  27. 72 72
      glm/gtc/matrix_integer.hpp
  28. 12 12
      glm/gtc/matrix_inverse.inl
  29. 35 35
      glm/gtc/matrix_transform.hpp
  30. 53 53
      glm/gtc/matrix_transform.inl
  31. 8 8
      glm/gtc/quaternion.hpp
  32. 11 11
      glm/gtc/quaternion.inl
  33. 36 36
      glm/gtc/type_precision.hpp
  34. 12 12
      glm/gtc/type_ptr.hpp
  35. 48 48
      glm/gtc/type_ptr.inl
  36. 1 1
      glm/gtx/color_space.hpp
  37. 2 2
      glm/gtx/color_space.inl
  38. 36 36
      glm/gtx/compatibility.hpp
  39. 6 6
      glm/gtx/dual_quaternion.hpp
  40. 8 8
      glm/gtx/dual_quaternion.inl
  41. 17 17
      glm/gtx/euler_angles.hpp
  42. 28 28
      glm/gtx/euler_angles.inl
  43. 18 18
      glm/gtx/hash.hpp
  44. 9 9
      glm/gtx/hash.inl
  45. 10 10
      glm/gtx/io.hpp
  46. 21 21
      glm/gtx/io.inl
  47. 2 2
      glm/gtx/matrix_cross_product.hpp
  48. 4 4
      glm/gtx/matrix_cross_product.inl
  49. 1 1
      glm/gtx/matrix_decompose.hpp
  50. 5 5
      glm/gtx/matrix_decompose.inl
  51. 7 7
      glm/gtx/matrix_interpolation.hpp
  52. 12 12
      glm/gtx/matrix_interpolation.inl
  53. 18 18
      glm/gtx/matrix_major_storage.hpp
  54. 30 30
      glm/gtx/matrix_major_storage.inl
  55. 9 9
      glm/gtx/matrix_operation.hpp
  56. 18 18
      glm/gtx/matrix_operation.inl
  57. 10 10
      glm/gtx/matrix_query.hpp
  58. 14 14
      glm/gtx/matrix_query.inl
  59. 10 10
      glm/gtx/matrix_transform_2d.hpp
  60. 15 15
      glm/gtx/matrix_transform_2d.inl
  61. 1 1
      glm/gtx/orthonormalize.hpp
  62. 2 2
      glm/gtx/orthonormalize.inl
  63. 4 4
      glm/gtx/quaternion.hpp
  64. 3 3
      glm/gtx/rotate_normalized_axis.hpp
  65. 4 4
      glm/gtx/rotate_normalized_axis.inl
  66. 1 1
      glm/gtx/rotate_vector.hpp
  67. 3 3
      glm/gtx/rotate_vector.inl
  68. 18 18
      glm/gtx/string_cast.inl
  69. 3 3
      glm/gtx/transform.hpp
  70. 6 6
      glm/gtx/transform.inl
  71. 20 20
      glm/gtx/transform2.hpp
  72. 23 23
      glm/gtx/transform2.inl
  73. 9 9
      glm/gtx/type_trait.hpp
  74. 6 6
      glm/mat2x2.hpp
  75. 3 3
      glm/mat2x3.hpp
  76. 3 3
      glm/mat2x4.hpp
  77. 3 3
      glm/mat3x2.hpp
  78. 6 6
      glm/mat3x3.hpp
  79. 3 3
      glm/mat3x4.hpp
  80. 3 3
      glm/mat4x2.hpp
  81. 3 3
      glm/mat4x3.hpp
  82. 6 6
      glm/mat4x4.hpp
  83. 1 1
      glm/simd/matrix.h
  84. 27 27
      test/gtx/gtx_io.cpp

+ 9 - 9
glm/detail/func_matrix.hpp

@@ -37,55 +37,55 @@ namespace detail
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<2, 2, T, P, vec, vec>
 	struct outerProduct_trait<2, 2, T, P, vec, vec>
 	{
 	{
-		typedef tmat2x2<T, P> type;
+		typedef mat<2, 2, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<2, 3, T, P, vec, vec>
 	struct outerProduct_trait<2, 3, T, P, vec, vec>
 	{
 	{
-		typedef tmat3x2<T, P> type;
+		typedef mat<3, 2, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<2, 4, T, P, vec, vec>
 	struct outerProduct_trait<2, 4, T, P, vec, vec>
 	{
 	{
-		typedef tmat4x2<T, P> type;
+		typedef mat<4, 2, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<3, 2, T, P, vec, vec>
 	struct outerProduct_trait<3, 2, T, P, vec, vec>
 	{
 	{
-		typedef tmat2x3<T, P> type;
+		typedef mat<2, 3, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<3, 3, T, P, vec, vec>
 	struct outerProduct_trait<3, 3, T, P, vec, vec>
 	{
 	{
-		typedef tmat3x3<T, P> type;
+		typedef mat<3, 3, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<3, 4, T, P, vec, vec>
 	struct outerProduct_trait<3, 4, T, P, vec, vec>
 	{
 	{
-		typedef tmat4x3<T, P> type;
+		typedef mat<4, 3, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<4, 2, T, P, vec, vec>
 	struct outerProduct_trait<4, 2, T, P, vec, vec>
 	{
 	{
-		typedef tmat2x4<T, P> type;
+		typedef mat<2, 4, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<4, 3, T, P, vec, vec>
 	struct outerProduct_trait<4, 3, T, P, vec, vec>
 	{
 	{
-		typedef tmat3x4<T, P> type;
+		typedef mat<3, 4, T, P> type;
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	struct outerProduct_trait<4, 4, T, P, vec, vec>
 	struct outerProduct_trait<4, 4, T, P, vec, vec>
 	{
 	{
-		typedef tmat4x4<T, P> type;
+		typedef mat<4, 4, T, P> type;
 	};
 	};
 
 
 }//namespace detail
 }//namespace detail

+ 60 - 60
glm/detail/func_matrix.inl

@@ -7,27 +7,27 @@
 namespace glm{
 namespace glm{
 namespace detail
 namespace detail
 {
 {
-	template <template <typename, precision> class matType, typename T, precision P, bool Aligned>
+	template <template <length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned>
 	struct compute_matrixCompMult
 	struct compute_matrixCompMult
 	{
 	{
-		GLM_FUNC_QUALIFIER static matType<T, P> call(matType<T, P> const& x, matType<T, P> const& y)
+		GLM_FUNC_QUALIFIER static matType<C, R, T, P> call(matType<C, R, T, P> const& x, matType<C, R, T, P> const& y)
 		{
 		{
-			matType<T, P> result(uninitialize);
+			matType<C, R, T, P> result(uninitialize);
 			for(length_t i = 0; i < result.length(); ++i)
 			for(length_t i = 0; i < result.length(); ++i)
 				result[i] = x[i] * y[i];
 				result[i] = x[i] * y[i];
 			return result;
 			return result;
 		}
 		}
 	};
 	};
 
 
-	template <template <class, precision> class matType, typename T, precision P, bool Aligned>
+	template <template <length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned>
 	struct compute_transpose{};
 	struct compute_transpose{};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat2x2, T, P, Aligned>
+	struct compute_transpose<mat, 2, 2, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat2x2<T, P> call(tmat2x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m)
 		{
 		{
-			tmat2x2<T, P> result(uninitialize);
+			mat<2, 2, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[1][0] = m[0][1];
 			result[1][0] = m[0][1];
@@ -37,11 +37,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat2x3, T, P, Aligned>
+	struct compute_transpose<mat, 2, 3, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat3x2<T, P> call(tmat2x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<3, 2, T, P> call(mat<2, 3, T, P> const& m)
 		{
 		{
-			tmat3x2<T, P> result(uninitialize);
+			mat<3,2, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[1][0] = m[0][1];
 			result[1][0] = m[0][1];
@@ -53,11 +53,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat2x4, T, P, Aligned>
+	struct compute_transpose<mat, 2, 4, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat4x2<T, P> call(tmat2x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<4, 2, T, P> call(mat<2, 4, T, P> const& m)
 		{
 		{
-			tmat4x2<T, P> result(uninitialize);
+			mat<4, 2, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[1][0] = m[0][1];
 			result[1][0] = m[0][1];
@@ -71,11 +71,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat3x2, T, P, Aligned>
+	struct compute_transpose<mat, 3, 2, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat2x3<T, P> call(tmat3x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<2, 3, T, P> call(mat<3, 2, T, P> const& m)
 		{
 		{
-			tmat2x3<T, P> result(uninitialize);
+			mat<2, 3, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[0][2] = m[2][0];
 			result[0][2] = m[2][0];
@@ -87,11 +87,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat3x3, T, P, Aligned>
+	struct compute_transpose<mat, 3, 3, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat3x3<T, P> call(tmat3x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m)
 		{
 		{
-			tmat3x3<T, P> result(uninitialize);
+			mat<3, 3, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[0][2] = m[2][0];
 			result[0][2] = m[2][0];
@@ -108,11 +108,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat3x4, T, P, Aligned>
+	struct compute_transpose<mat, 3, 4, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat4x3<T, P> call(tmat3x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<4, 3, T, P> call(mat<3, 4, T, P> const& m)
 		{
 		{
-			tmat4x3<T, P> result(uninitialize);
+			mat<4, 3, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[0][2] = m[2][0];
 			result[0][2] = m[2][0];
@@ -130,11 +130,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat4x2, T, P, Aligned>
+	struct compute_transpose<mat, 4, 2, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat2x4<T, P> call(tmat4x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<2, 4, T, P> call(mat<4, 2, T, P> const& m)
 		{
 		{
-			tmat2x4<T, P> result(uninitialize);
+			mat<2, 4, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[0][2] = m[2][0];
 			result[0][2] = m[2][0];
@@ -148,11 +148,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat4x3, T, P, Aligned>
+	struct compute_transpose<mat, 4, 3, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat3x4<T, P> call(tmat4x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<3, 4, T, P> call(mat<4, 3, T, P> const& m)
 		{
 		{
-			tmat3x4<T, P> result(uninitialize);
+			mat<3, 4, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[0][2] = m[2][0];
 			result[0][2] = m[2][0];
@@ -170,11 +170,11 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_transpose<tmat4x4, T, P, Aligned>
+	struct compute_transpose<mat, 4, 4, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat4x4<T, P> call(tmat4x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m)
 		{
 		{
-			tmat4x4<T, P> result(uninitialize);
+			mat<4, 4, T, P> result(uninitialize);
 			result[0][0] = m[0][0];
 			result[0][0] = m[0][0];
 			result[0][1] = m[1][0];
 			result[0][1] = m[1][0];
 			result[0][2] = m[2][0];
 			result[0][2] = m[2][0];
@@ -198,22 +198,22 @@ namespace detail
 		}
 		}
 	};
 	};
 
 
-	template <template <typename, precision> class matType, typename T, precision P, bool Aligned>
+	template <template <length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned>
 	struct compute_determinant{};
 	struct compute_determinant{};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_determinant<tmat2x2, T, P, Aligned>
+	struct compute_determinant<mat, 2, 2, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static T call(tmat2x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER static T call(mat<2, 2, T, P> const& m)
 		{
 		{
 			return m[0][0] * m[1][1] - m[1][0] * m[0][1];
 			return m[0][0] * m[1][1] - m[1][0] * m[0][1];
 		}
 		}
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_determinant<tmat3x3, T, P, Aligned>
+	struct compute_determinant<mat, 3, 3, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static T call(tmat3x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER static T call(mat<3, 3, T, P> const& m)
 		{
 		{
 			return
 			return
 				+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])
 				+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])
@@ -223,9 +223,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_determinant<tmat4x4, T, P, Aligned>
+	struct compute_determinant<mat, 4, 4, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static T call(tmat4x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER static T call(mat<4, 4, T, P> const& m)
 		{
 		{
 			T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
 			T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
 			T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
 			T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
@@ -246,19 +246,19 @@ namespace detail
 		}
 		}
 	};
 	};
 
 
-	template <template <typename, precision> class matType, typename T, precision P, bool Aligned>
+	template <template <length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned>
 	struct compute_inverse{};
 	struct compute_inverse{};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_inverse<tmat2x2, T, P, Aligned>
+	struct compute_inverse<mat, 2, 2, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat2x2<T, P> call(tmat2x2<T, P> const& m)
+		GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m)
 		{
 		{
 			T OneOverDeterminant = static_cast<T>(1) / (
 			T OneOverDeterminant = static_cast<T>(1) / (
 				+ m[0][0] * m[1][1]
 				+ m[0][0] * m[1][1]
 				- m[1][0] * m[0][1]);
 				- m[1][0] * m[0][1]);
 
 
-			tmat2x2<T, P> Inverse(
+			mat<2, 2, T, P> Inverse(
 				+ m[1][1] * OneOverDeterminant,
 				+ m[1][1] * OneOverDeterminant,
 				- m[0][1] * OneOverDeterminant,
 				- m[0][1] * OneOverDeterminant,
 				- m[1][0] * OneOverDeterminant,
 				- m[1][0] * OneOverDeterminant,
@@ -269,16 +269,16 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_inverse<tmat3x3, T, P, Aligned>
+	struct compute_inverse<mat, 3, 3, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat3x3<T, P> call(tmat3x3<T, P> const& m)
+		GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m)
 		{
 		{
 			T OneOverDeterminant = static_cast<T>(1) / (
 			T OneOverDeterminant = static_cast<T>(1) / (
 				+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])
 				+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])
 				- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])
 				- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])
 				+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]));
 				+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]));
 
 
-			tmat3x3<T, P> Inverse(uninitialize);
+			mat<3, 3, T, P> Inverse(uninitialize);
 			Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant;
 			Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant;
 			Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant;
 			Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant;
 			Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant;
 			Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant;
@@ -294,9 +294,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P, bool Aligned>
 	template <typename T, precision P, bool Aligned>
-	struct compute_inverse<tmat4x4, T, P, Aligned>
+	struct compute_inverse<mat, 4, 4, T, P, Aligned>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat4x4<T, P> call(tmat4x4<T, P> const& m)
+		GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m)
 		{
 		{
 			T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
 			T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
 			T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];
 			T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];
@@ -341,7 +341,7 @@ namespace detail
 
 
 			vec<4, T, P> SignA(+1, -1, +1, -1);
 			vec<4, T, P> SignA(+1, -1, +1, -1);
 			vec<4, T, P> SignB(-1, +1, -1, +1);
 			vec<4, T, P> SignB(-1, +1, -1, +1);
-			tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB);
+			mat<4, 4, T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB);
 
 
 			vec<4, T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);
 			vec<4, T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);
 
 
@@ -355,11 +355,11 @@ namespace detail
 	};
 	};
 }//namespace detail
 }//namespace detail
 
 
-	template <typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_QUALIFIER matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y)
+	template <length_t C, length_t R, typename T, precision P, template <length_t, length_t, typename, precision> class matType>
+	GLM_FUNC_QUALIFIER matType<C, R, T, P> matrixCompMult(matType<C, R, T, P> const & x, matType<C, R, T, P> const & y)
 	{
 	{
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'matrixCompMult' only accept floating-point inputs");
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'matrixCompMult' only accept floating-point inputs");
-		return detail::compute_matrixCompMult<matType, T, P, detail::is_aligned<P>::value>::call(x, y);
+		return detail::compute_matrixCompMult<matType, C, R, T, P, detail::is_aligned<P>::value>::call(x, y);
 	}
 	}
 
 
 	template<int DA, int DB, typename T, precision P, template <int, typename, precision> class vecTypeA, template <int, typename, precision> class vecTypeB>
 	template<int DA, int DB, typename T, precision P, template <int, typename, precision> class vecTypeA, template <int, typename, precision> class vecTypeB>
@@ -373,25 +373,25 @@ namespace detail
 		return m;
 		return m;
 	}
 	}
 
 
-	template <typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_QUALIFIER typename matType<T, P>::transpose_type transpose(matType<T, P> const & m)
+	template <length_t C, length_t R, typename T, precision P, template <length_t C, length_t R, typename, precision> class matType>
+	GLM_FUNC_QUALIFIER typename matType<C, R, T, P>::transpose_type transpose(matType<C, R, T, P> const & m)
 	{
 	{
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'transpose' only accept floating-point inputs");
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'transpose' only accept floating-point inputs");
-		return detail::compute_transpose<matType, T, P, detail::is_aligned<P>::value>::call(m);
+		return detail::compute_transpose<matType, C, R, T, P, detail::is_aligned<P>::value>::call(m);
 	}
 	}
 
 
-	template <typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_QUALIFIER T determinant(matType<T, P> const & m)
+	template <length_t C, length_t R, typename T, precision P, template <length_t C, length_t R, typename, precision> class matType>
+	GLM_FUNC_QUALIFIER T determinant(matType<C, R, T, P> const & m)
 	{
 	{
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'determinant' only accept floating-point inputs");
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'determinant' only accept floating-point inputs");
-		return detail::compute_determinant<matType, T, P, detail::is_aligned<P>::value>::call(m);
+		return detail::compute_determinant<matType, C, R, T, P, detail::is_aligned<P>::value>::call(m);
 	}
 	}
 
 
-	template <typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_QUALIFIER matType<T, P> inverse(matType<T, P> const & m)
+	template <length_t C, length_t R, typename T, precision P, template <length_t C, length_t R, typename, precision> class matType>
+	GLM_FUNC_QUALIFIER matType<C, R, T, P> inverse(matType<C, R, T, P> const & m)
 	{
 	{
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'inverse' only accept floating-point inputs");
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'inverse' only accept floating-point inputs");
-		return detail::compute_inverse<matType, T, P, detail::is_aligned<P>::value>::call(m);
+		return detail::compute_inverse<matType, C, R, T, P, detail::is_aligned<P>::value>::call(m);
 	}
 	}
 }//namespace glm
 }//namespace glm
 
 

+ 17 - 17
glm/detail/func_matrix_simd.inl

@@ -11,13 +11,13 @@ namespace glm{
 namespace detail
 namespace detail
 {
 {
 	template <precision P>
 	template <precision P>
-	struct compute_matrixCompMult<tmat4x4, float, P, true>
+	struct compute_matrixCompMult<mat<4, 4, float, P, true>
 	{
 	{
 		GLM_STATIC_ASSERT(detail::is_aligned<P>::value, "Specialization requires aligned");
 		GLM_STATIC_ASSERT(detail::is_aligned<P>::value, "Specialization requires aligned");
 
 
-		GLM_FUNC_QUALIFIER static tmat4x4<float, P> call(tmat4x4<float, P> const & x, tmat4x4<float, P> const & y)
+		GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & x, mat<4, 4, float, P> const & y)
 		{
 		{
-			tmat4x4<float, P> result(uninitialize);
+			mat<4, 4, float, P> result(uninitialize);
 			glm_mat4_matrixCompMult(
 			glm_mat4_matrixCompMult(
 				*(glm_vec4 const (*)[4])&x[0].data,
 				*(glm_vec4 const (*)[4])&x[0].data,
 				*(glm_vec4 const (*)[4])&y[0].data,
 				*(glm_vec4 const (*)[4])&y[0].data,
@@ -27,11 +27,11 @@ namespace detail
 	};
 	};
 
 
 	template <precision P>
 	template <precision P>
-	struct compute_transpose<tmat4x4, float, P, true>
+	struct compute_transpose<mat<4, 4, float, P, true>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat4x4<float, P> call(tmat4x4<float, P> const & m)
+		GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & m)
 		{
 		{
-			tmat4x4<float, P> result(uninitialize);
+			mat<4, 4, float, P> result(uninitialize);
 			glm_mat4_transpose(
 			glm_mat4_transpose(
 				*(glm_vec4 const (*)[4])&m[0].data,
 				*(glm_vec4 const (*)[4])&m[0].data,
 				*(glm_vec4(*)[4])&result[0].data);
 				*(glm_vec4(*)[4])&result[0].data);
@@ -40,20 +40,20 @@ namespace detail
 	};
 	};
 
 
 	template <precision P>
 	template <precision P>
-	struct compute_determinant<tmat4x4, float, P, true>
+	struct compute_determinant<mat<4, 4, float, P, true>
 	{
 	{
-		GLM_FUNC_QUALIFIER static float call(tmat4x4<float, P> const& m)
+		GLM_FUNC_QUALIFIER static float call(mat<4, 4, float, P> const& m)
 		{
 		{
 			return _mm_cvtss_f32(glm_mat4_determinant(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data)));
 			return _mm_cvtss_f32(glm_mat4_determinant(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data)));
 		}
 		}
 	};
 	};
 
 
 	template <precision P>
 	template <precision P>
-	struct compute_inverse<tmat4x4, float, P, true>
+	struct compute_inverse<mat<4, 4, float, P, true>
 	{
 	{
-		GLM_FUNC_QUALIFIER static tmat4x4<float, P> call(tmat4x4<float, P> const& m)
+		GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const& m)
 		{
 		{
-			tmat4x4<float, P> Result(uninitialize);
+			mat<4, 4, float, P> Result(uninitialize);
 			glm_mat4_inverse(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data), *reinterpret_cast<__m128(*)[4]>(&Result[0].data));
 			glm_mat4_inverse(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data), *reinterpret_cast<__m128(*)[4]>(&Result[0].data));
 			return Result;
 			return Result;
 		}
 		}
@@ -61,25 +61,25 @@ namespace detail
 }//namespace detail
 }//namespace detail
 
 
 	template<>
 	template<>
-	GLM_FUNC_QUALIFIER tmat4x4<float, aligned_lowp> outerProduct<4, 4, float, aligned_lowp, vec, vec>(vec<4, float, aligned_lowp> const & c, vec<4, float, aligned_lowp> const & r)
+	GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_lowp> outerProduct<4, 4, float, aligned_lowp, vec, vec>(vec<4, float, aligned_lowp> const & c, vec<4, float, aligned_lowp> const & r)
 	{
 	{
-		tmat4x4<float, aligned_lowp> m(uninitialize);
+		mat<4, 4, float, aligned_lowp> m(uninitialize);
 		glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
 		glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
 		return m;
 		return m;
 	}
 	}
 
 
 	template<>
 	template<>
-	GLM_FUNC_QUALIFIER tmat4x4<float, aligned_mediump> outerProduct<4, 4, float, aligned_mediump, vec, vec>(vec<4, float, aligned_mediump> const & c, vec<4, float, aligned_mediump> const & r)
+	GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_mediump> outerProduct<4, 4, float, aligned_mediump, vec, vec>(vec<4, float, aligned_mediump> const & c, vec<4, float, aligned_mediump> const & r)
 	{
 	{
-		tmat4x4<float, aligned_mediump> m(uninitialize);
+		mat<4, 4, float, aligned_mediump> m(uninitialize);
 		glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
 		glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
 		return m;
 		return m;
 	}
 	}
 
 
 	template<>
 	template<>
-	GLM_FUNC_QUALIFIER tmat4x4<float, aligned_highp> outerProduct<4, 4, float, aligned_highp, vec, vec>(vec<4, float, aligned_highp> const & c, vec<4, float, aligned_highp> const & r)
+	GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_highp> outerProduct<4, 4, float, aligned_highp, vec, vec>(vec<4, float, aligned_highp> const & c, vec<4, float, aligned_highp> const & r)
 	{
 	{
-		tmat4x4<float, aligned_highp> m(uninitialize);
+		mat<4, 4, float, aligned_highp> m(uninitialize);
 		glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
 		glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
 		return m;
 		return m;
 	}
 	}

+ 54 - 54
glm/detail/glm.cpp

@@ -145,94 +145,94 @@ template struct vec<4, float32, highp>;
 template struct vec<4, float64, highp>;
 template struct vec<4, float64, highp>;
 
 
 // tmat2x2 type explicit instantiation
 // tmat2x2 type explicit instantiation
-template struct tmat2x2<float32, lowp>;
-template struct tmat2x2<float64, lowp>;
+template struct mat<2, 2, float32, lowp>;
+template struct mat<2, 2, float64, lowp>;
 
 
-template struct tmat2x2<float32, mediump>;
-template struct tmat2x2<float64, mediump>;
+template struct mat<2, 2, float32, mediump>;
+template struct mat<2, 2, float64, mediump>;
 
 
-template struct tmat2x2<float32, highp>;
-template struct tmat2x2<float64, highp>;
+template struct mat<2, 2, float32, highp>;
+template struct mat<2, 2, float64, highp>;
 
 
 // tmat2x3 type explicit instantiation
 // tmat2x3 type explicit instantiation
-template struct tmat2x3<float32, lowp>;
-template struct tmat2x3<float64, lowp>;
+template struct mat<2, 3, float32, lowp>;
+template struct mat<2, 3, float64, lowp>;
 
 
-template struct tmat2x3<float32, mediump>;
-template struct tmat2x3<float64, mediump>;
+template struct mat<2, 3, float32, mediump>;
+template struct mat<2, 3, float64, mediump>;
 
 
-template struct tmat2x3<float32, highp>;
-template struct tmat2x3<float64, highp>;
+template struct mat<2, 3, float32, highp>;
+template struct mat<2, 3, float64, highp>;
 
 
 // tmat2x4 type explicit instantiation
 // tmat2x4 type explicit instantiation
-template struct tmat2x4<float32, lowp>;
-template struct tmat2x4<float64, lowp>;
+template struct mat<2, 4, float32, lowp>;
+template struct mat<2, 4, float64, lowp>;
 
 
-template struct tmat2x4<float32, mediump>;
-template struct tmat2x4<float64, mediump>;
+template struct mat<2, 4, float32, mediump>;
+template struct mat<2, 4, float64, mediump>;
 
 
-template struct tmat2x4<float32, highp>;
-template struct tmat2x4<float64, highp>;
+template struct mat<2, 4, float32, highp>;
+template struct mat<2, 4, float64, highp>;
 
 
 // tmat3x2 type explicit instantiation
 // tmat3x2 type explicit instantiation
-template struct tmat3x2<float32, lowp>;
-template struct tmat3x2<float64, lowp>;
+template struct mat<3, 2, float32, lowp>;
+template struct mat<3, 2, float64, lowp>;
 
 
-template struct tmat3x2<float32, mediump>;
-template struct tmat3x2<float64, mediump>;
+template struct mat<3, 2, float32, mediump>;
+template struct mat<3, 2, float64, mediump>;
 
 
-template struct tmat3x2<float32, highp>;
-template struct tmat3x2<float64, highp>;
+template struct mat<3, 2, float32, highp>;
+template struct mat<3, 2, float64, highp>;
 
 
 // tmat3x3 type explicit instantiation
 // tmat3x3 type explicit instantiation
-template struct tmat3x3<float32, lowp>;
-template struct tmat3x3<float64, lowp>;
+template struct mat<3, 3, float32, lowp>;
+template struct mat<3, 3, float64, lowp>;
 
 
-template struct tmat3x3<float32, mediump>;
-template struct tmat3x3<float64, mediump>;
+template struct mat<3, 3, float32, mediump>;
+template struct mat<3, 3, float64, mediump>;
 
 
-template struct tmat3x3<float32, highp>;
-template struct tmat3x3<float64, highp>;
+template struct mat<3, 3, float32, highp>;
+template struct mat<3, 3, float64, highp>;
 
 
 // tmat3x4 type explicit instantiation
 // tmat3x4 type explicit instantiation
-template struct tmat3x4<float32, lowp>;
-template struct tmat3x4<float64, lowp>;
+template struct mat<3, 4, float32, lowp>;
+template struct mat<3, 4, float64, lowp>;
 
 
-template struct tmat3x4<float32, mediump>;
-template struct tmat3x4<float64, mediump>;
+template struct mat<3, 4, float32, mediump>;
+template struct mat<3, 4, float64, mediump>;
 
 
-template struct tmat3x4<float32, highp>;
-template struct tmat3x4<float64, highp>;
+template struct mat<3, 4, float32, highp>;
+template struct mat<3, 4, float64, highp>;
 
 
 // tmat4x2 type explicit instantiation
 // tmat4x2 type explicit instantiation
-template struct tmat4x2<float32, lowp>;
-template struct tmat4x2<float64, lowp>;
+template struct mat<4, 2, float32, lowp>;
+template struct mat<4, 2, float64, lowp>;
 
 
-template struct tmat4x2<float32, mediump>;
-template struct tmat4x2<float64, mediump>;
+template struct mat<4, 2, float32, mediump>;
+template struct mat<4, 2, float64, mediump>;
 
 
-template struct tmat4x2<float32, highp>;
-template struct tmat4x2<float64, highp>;
+template struct mat<4, 2, float32, highp>;
+template struct mat<4, 2, float64, highp>;
 
 
 // tmat4x3 type explicit instantiation
 // tmat4x3 type explicit instantiation
-template struct tmat4x3<float32, lowp>;
-template struct tmat4x3<float64, lowp>;
+template struct mat<4, 3, float32, lowp>;
+template struct mat<4, 3, float64, lowp>;
 
 
-template struct tmat4x3<float32, mediump>;
-template struct tmat4x3<float64, mediump>;
+template struct mat<4, 3, float32, mediump>;
+template struct mat<4, 3, float64, mediump>;
 
 
-template struct tmat4x3<float32, highp>;
-template struct tmat4x3<float64, highp>;
+template struct mat<4, 3, float32, highp>;
+template struct mat<4, 3, float64, highp>;
 
 
 // tmat4x4 type explicit instantiation
 // tmat4x4 type explicit instantiation
-template struct tmat4x4<float32, lowp>;
-template struct tmat4x4<float64, lowp>;
+template struct mat<4, 4, float32, lowp>;
+template struct mat<4, 4, float64, lowp>;
 
 
-template struct tmat4x4<float32, mediump>;
-template struct tmat4x4<float64, mediump>;
+template struct mat<4, 4, float32, mediump>;
+template struct mat<4, 4, float64, mediump>;
 
 
-template struct tmat4x4<float32, highp>;
-template struct tmat4x4<float64, highp>;
+template struct mat<4, 4, float32, highp>;
+template struct mat<4, 4, float64, highp>;
 
 
 // tquat type explicit instantiation
 // tquat type explicit instantiation
 template struct tquat<float32, lowp>;
 template struct tquat<float32, lowp>;

+ 4 - 1
glm/detail/precision.hpp

@@ -31,7 +31,10 @@ namespace glm
 			defaultp = highp
 			defaultp = highp
 #		endif
 #		endif
 	};
 	};
-	
+
+	template <length_t L, typename T, precision P = defaultp> struct vec;
+	template <length_t C, length_t R, typename T, precision P = defaultp> struct mat;
+
 namespace detail
 namespace detail
 {
 {
 	template <glm::precision P>
 	template <glm::precision P>

+ 72 - 83
glm/detail/type_mat.hpp

@@ -12,17 +12,6 @@ namespace detail
 	struct outerProduct_trait{};
 	struct outerProduct_trait{};
 }//namespace detail
 }//namespace detail
 
 
-	template <int D, typename T, precision P> struct vec;
-	template <typename T, precision P> struct tmat2x2;
-	template <typename T, precision P> struct tmat2x3;
-	template <typename T, precision P> struct tmat2x4;
-	template <typename T, precision P> struct tmat3x2;
-	template <typename T, precision P> struct tmat3x3;
-	template <typename T, precision P> struct tmat3x4;
-	template <typename T, precision P> struct tmat4x2;
-	template <typename T, precision P> struct tmat4x3;
-	template <typename T, precision P> struct tmat4x4;
-
 	template <typename T, precision P, template <typename, precision> class matType>
 	template <typename T, precision P, template <typename, precision> class matType>
 	GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);
 	GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);
 
 
@@ -34,42 +23,42 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, lowp>		lowp_mat2;
+	typedef mat<2, 2, float, lowp>		lowp_mat2;
 	
 	
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, mediump>		mediump_mat2;
+	typedef mat<2, 2, float, mediump>	mediump_mat2;
 	
 	
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, highp>		highp_mat2;
+	typedef mat<2, 2, float, highp>		highp_mat2;
 	
 	
 	/// 2 columns of 2 components matrix of low precision floating-point numbers.
 	/// 2 columns of 2 components matrix of low precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, lowp>		lowp_mat2x2;
+	typedef mat<2, 2, float, lowp>		lowp_mat2x2;
 	
 	
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, mediump>		mediump_mat2x2;
+	typedef mat<2, 2, float, mediump>	mediump_mat2x2;
 	
 	
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, highp>		highp_mat2x2;
+	typedef mat<2, 2, float, highp>		highp_mat2x2;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -81,21 +70,21 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<float, lowp>		lowp_mat2x3;
+	typedef mat<2, 3, float, lowp>		lowp_mat2x3;
 	
 	
 	/// 2 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<float, mediump>		mediump_mat2x3;
+	typedef mat<2, 3, float, mediump>	mediump_mat2x3;
 	
 	
 	/// 2 columns of 3 components matrix of high precision floating-point numbers.
 	/// 2 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<float, highp>		highp_mat2x3;
+	typedef mat<2, 3, float, highp>		highp_mat2x3;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -107,21 +96,21 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<float, lowp>		lowp_mat2x4;
+	typedef mat<2, 4, float, lowp>		lowp_mat2x4;
 	
 	
 	/// 2 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<float, mediump>		mediump_mat2x4;
+	typedef mat<2, 4, float, mediump>	mediump_mat2x4;
 	
 	
 	/// 2 columns of 4 components matrix of high precision floating-point numbers.
 	/// 2 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<float, highp>		highp_mat2x4;
+	typedef mat<2, 4, float, highp>		highp_mat2x4;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -133,21 +122,21 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<float, lowp>		lowp_mat3x2;
+	typedef mat<3, 2, float, lowp>		lowp_mat3x2;
 	
 	
 	/// 3 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<float, mediump>		mediump_mat3x2;
+	typedef mat<3, 2, float, mediump>	mediump_mat3x2;
 	
 	
 	/// 3 columns of 2 components matrix of high precision floating-point numbers.
 	/// 3 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<float, highp>		highp_mat3x2;
+	typedef mat<3, 2, float, highp>		highp_mat3x2;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -159,42 +148,42 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, lowp>		lowp_mat3;
+	typedef mat<3, 3, float, lowp>		lowp_mat3;
 	
 	
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, mediump>		mediump_mat3;
+	typedef mat<3, 3, float, mediump>	mediump_mat3;
 	
 	
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, highp>		highp_mat3;
+	typedef mat<3, 3, float, highp>		highp_mat3;
 	
 	
 	/// 3 columns of 3 components matrix of low precision floating-point numbers.
 	/// 3 columns of 3 components matrix of low precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, lowp>		lowp_mat3x3;
+	typedef mat<3, 3, float, lowp>		lowp_mat3x3;
 	
 	
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, mediump>		mediump_mat3x3;
+	typedef mat<3, 3, float, mediump>	mediump_mat3x3;
 	
 	
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, highp>		highp_mat3x3;
+	typedef mat<3, 3, float, highp>		highp_mat3x3;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -206,21 +195,21 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<float, lowp>		lowp_mat3x4;
+	typedef mat<3, 4, float, lowp>		lowp_mat3x4;
 	
 	
 	/// 3 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<float, mediump>		mediump_mat3x4;
+	typedef mat<3, 4, float, mediump>	mediump_mat3x4;
 	
 	
 	/// 3 columns of 4 components matrix of high precision floating-point numbers.
 	/// 3 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<float, highp>		highp_mat3x4;
+	typedef mat<3, 4, float, highp>		highp_mat3x4;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -232,21 +221,21 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<float, lowp>		lowp_mat4x2;
+	typedef mat<4, 2, float, lowp>		lowp_mat4x2;
 	
 	
 	/// 4 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<float, mediump>		mediump_mat4x2;
+	typedef mat<4, 2, float, mediump>	mediump_mat4x2;
 	
 	
 	/// 4 columns of 2 components matrix of high precision floating-point numbers.
 	/// 4 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<float, highp>		highp_mat4x2;
+	typedef mat<4, 2, float, highp>		highp_mat4x2;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -258,21 +247,21 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<float, lowp>		lowp_mat4x3;
+	typedef mat<4, 3, float, lowp>		lowp_mat4x3;
 	
 	
 	/// 4 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<float, mediump>		mediump_mat4x3;
+	typedef mat<4, 3, float, mediump>	mediump_mat4x3;
 	
 	
 	/// 4 columns of 3 components matrix of high precision floating-point numbers.
 	/// 4 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<float, highp>		highp_mat4x3;
+	typedef mat<4, 3, float, highp>		highp_mat4x3;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -285,42 +274,42 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, lowp>		lowp_mat4;
+	typedef mat<4, 4, float, lowp>		lowp_mat4;
 	
 	
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, mediump>		mediump_mat4;
+	typedef mat<4, 4, float, mediump>	mediump_mat4;
 	
 	
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, highp>		highp_mat4;
+	typedef mat<4, 4, float, highp>		highp_mat4;
 	
 	
 	/// 4 columns of 4 components matrix of low precision floating-point numbers.
 	/// 4 columns of 4 components matrix of low precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, lowp>		lowp_mat4x4;
+	typedef mat<4, 4, float, lowp>		lowp_mat4x4;
 	
 	
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, mediump>		mediump_mat4x4;
+	typedef mat<4, 4, float, mediump>	mediump_mat4x4;
 	
 	
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, highp>		highp_mat4x4;
+	typedef mat<4, 4, float, highp>		highp_mat4x4;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -423,37 +412,37 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<double, lowp>		lowp_dmat2;
+	typedef mat<2, 2, double, lowp>		lowp_dmat2;
 	
 	
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<double, mediump>	mediump_dmat2;
+	typedef mat<2, 2, double, mediump>	mediump_dmat2;
 	
 	
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<double, highp>		highp_dmat2;
+	typedef mat<2, 2, double, highp>		highp_dmat2;
 	
 	
 	/// 2 columns of 2 components matrix of low precision floating-point numbers.
 	/// 2 columns of 2 components matrix of low precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<double, lowp>		lowp_dmat2x2;
+	typedef mat<2, 2, double, lowp>		lowp_dmat2x2;
 	
 	
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<double, mediump>	mediump_dmat2x2;
+	typedef mat<2, 2, double, mediump>	mediump_dmat2x2;
 	
 	
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<double, highp>		highp_dmat2x2;
+	typedef mat<2, 2, double, highp>		highp_dmat2x2;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -464,19 +453,19 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<double, lowp>		lowp_dmat2x3;
+	typedef mat<2, 3, double, lowp>		lowp_dmat2x3;
 	
 	
 	/// 2 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 3 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<double, mediump>	mediump_dmat2x3;
+	typedef mat<2, 3, double, mediump>	mediump_dmat2x3;
 	
 	
 	/// 2 columns of 3 components matrix of high precision floating-point numbers.
 	/// 2 columns of 3 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<double, highp>		highp_dmat2x3;
+	typedef mat<2, 3, double, highp>		highp_dmat2x3;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -487,19 +476,19 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<double, lowp>		lowp_dmat2x4;
+	typedef mat<2, 4, double, lowp>		lowp_dmat2x4;
 	
 	
 	/// 2 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 4 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<double, mediump>	mediump_dmat2x4;
+	typedef mat<2, 4, double, mediump>	mediump_dmat2x4;
 	
 	
 	/// 2 columns of 4 components matrix of high precision floating-point numbers.
 	/// 2 columns of 4 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<double, highp>		highp_dmat2x4;
+	typedef mat<2, 4, double, highp>		highp_dmat2x4;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -510,19 +499,19 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<double, lowp>		lowp_dmat3x2;
+	typedef mat<3, 2, double, lowp>		lowp_dmat3x2;
 	
 	
 	/// 3 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 2 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<double, mediump>	mediump_dmat3x2;
+	typedef mat<3, 2, double, mediump>	mediump_dmat3x2;
 	
 	
 	/// 3 columns of 2 components matrix of high precision floating-point numbers.
 	/// 3 columns of 2 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<double, highp>		highp_dmat3x2;
+	typedef mat<3, 2, double, highp>		highp_dmat3x2;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -533,37 +522,37 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, lowp>		lowp_dmat3;
+	typedef mat<3, 3, float, lowp>		lowp_dmat3;
 	
 	
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<double, mediump>	mediump_dmat3;
+	typedef mat<3, 3, double, mediump>	mediump_dmat3;
 	
 	
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<double, highp>		highp_dmat3;
+	typedef mat<3, 3, double, highp>		highp_dmat3;
 	
 	
 	/// 3 columns of 3 components matrix of low precision floating-point numbers.
 	/// 3 columns of 3 components matrix of low precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<double, lowp>		lowp_dmat3x3;
+	typedef mat<3, 3, double, lowp>		lowp_dmat3x3;
 	
 	
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<double, mediump>	mediump_dmat3x3;
+	typedef mat<3, 3, double, mediump>	mediump_dmat3x3;
 	
 	
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<double, highp>		highp_dmat3x3;
+	typedef mat<3, 3, double, highp>		highp_dmat3x3;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -574,19 +563,19 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<double, lowp>		lowp_dmat3x4;
+	typedef mat<3, 4, double, lowp>		lowp_dmat3x4;
 	
 	
 	/// 3 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 4 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<double, mediump>	mediump_dmat3x4;
+	typedef mat<3, 4, double, mediump>	mediump_dmat3x4;
 	
 	
 	/// 3 columns of 4 components matrix of high precision floating-point numbers.
 	/// 3 columns of 4 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<double, highp>		highp_dmat3x4;
+	typedef mat<3, 4, double, highp>		highp_dmat3x4;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -597,19 +586,19 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<double, lowp>		lowp_dmat4x2;
+	typedef mat<4, 2, double, lowp>		lowp_dmat4x2;
 	
 	
 	/// 4 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 2 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<double, mediump>	mediump_dmat4x2;
+	typedef mat<4, 2, double, mediump>	mediump_dmat4x2;
 	
 	
 	/// 4 columns of 2 components matrix of high precision floating-point numbers.
 	/// 4 columns of 2 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<double, highp>		highp_dmat4x2;
+	typedef mat<4, 2, double, highp>		highp_dmat4x2;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -620,19 +609,19 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<double, lowp>		lowp_dmat4x3;
+	typedef mat<4, 3, double, lowp>		lowp_dmat4x3;
 	
 	
 	/// 4 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 3 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<double, mediump>	mediump_dmat4x3;
+	typedef mat<4, 3, double, mediump>	mediump_dmat4x3;
 	
 	
 	/// 4 columns of 3 components matrix of high precision floating-point numbers.
 	/// 4 columns of 3 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<double, highp>		highp_dmat4x3;
+	typedef mat<4, 3, double, highp>		highp_dmat4x3;
 	
 	
 	/// @}
 	/// @}
 	
 	
@@ -643,37 +632,37 @@ namespace detail
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<double, lowp>		lowp_dmat4;
+	typedef mat<4, 4, double, lowp>		lowp_dmat4;
 	
 	
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<double, mediump>	mediump_dmat4;
+	typedef mat<4, 4, double, mediump>	mediump_dmat4;
 	
 	
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<double, highp>		highp_dmat4;
+	typedef mat<4, 4, double, highp>		highp_dmat4;
 	
 	
 	/// 4 columns of 4 components matrix of low precision floating-point numbers.
 	/// 4 columns of 4 components matrix of low precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<double, lowp>		lowp_dmat4x4;
+	typedef mat<4, 4, double, lowp>		lowp_dmat4x4;
 	
 	
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<double, mediump>	mediump_dmat4x4;
+	typedef mat<4, 4, double, mediump>	mediump_dmat4x4;
 	
 	
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<double, highp>		highp_dmat4x4;
+	typedef mat<4, 4, double, highp>		highp_dmat4x4;
 	
 	
 	/// @}
 	/// @}
 	
 	

+ 58 - 58
glm/detail/type_mat2x2.hpp

@@ -11,13 +11,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat2x2
+	template <typename T, precision P>
+	struct mat<2, 2, T, P>
 	{
 	{
 		typedef vec<2, T, P> col_type;
 		typedef vec<2, T, P> col_type;
 		typedef vec<2, T, P> row_type;
 		typedef vec<2, T, P> row_type;
-		typedef tmat2x2<T, P> type;
-		typedef tmat2x2<T, P> transpose_type;
+		typedef mat<2, 2, T, P> type;
+		typedef mat<2, 2, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -26,45 +26,45 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat2x2() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<2, 2, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<2, 2, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x2(ctor);
-		GLM_FUNC_DECL explicit tmat2x2(T scalar);
-		GLM_FUNC_DECL tmat2x2(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T scalar);
+		GLM_FUNC_DECL mat(
 			T const & x1, T const & y1,
 			T const & x1, T const & y1,
 			T const & x2, T const & y2);
 			T const & x2, T const & y2);
-		GLM_FUNC_DECL tmat2x2(
+		GLM_FUNC_DECL mat(
 			col_type const & v1,
 			col_type const & v1,
 			col_type const & v2);
 			col_type const & v2);
 
 
 		// -- Conversions --
 		// -- Conversions --
 
 
 		template <typename U, typename V, typename M, typename N>
 		template <typename U, typename V, typename M, typename N>
-		GLM_FUNC_DECL tmat2x2(
+		GLM_FUNC_DECL mat(
 			U const & x1, V const & y1,
 			U const & x1, V const & y1,
 			M const & x2, N const & y2);
 			M const & x2, N const & y2);
 
 
 		template <typename U, typename V>
 		template <typename U, typename V>
-		GLM_FUNC_DECL tmat2x2(
+		GLM_FUNC_DECL mat(
 			vec<2, U, P> const & v1,
 			vec<2, U, P> const & v1,
 			vec<2, V, P> const & v2);
 			vec<2, V, P> const & v2);
 
 
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x2<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x3<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -76,106 +76,106 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator=(mat<2, 2, T, P> const & v) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator=(mat<2, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator+=(mat<2, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator-=(mat<2, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator*=(mat<2, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator/=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator/=(mat<2, 2, U, P> const & m);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat2x2<T, P> & operator++ ();
-		GLM_FUNC_DECL tmat2x2<T, P> & operator-- ();
-		GLM_FUNC_DECL tmat2x2<T, P> operator++(int);
-		GLM_FUNC_DECL tmat2x2<T, P> operator--(int);
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator++ ();
+		GLM_FUNC_DECL mat<2, 2, T, P> & operator-- ();
+		GLM_FUNC_DECL mat<2, 2, T, P> operator++(int);
+		GLM_FUNC_DECL mat<2, 2, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator+(T scalar, tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator+(T scalar, mat<2, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator-(T scalar, tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator-(T scalar, mat<2, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator*(T scalar, tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator*(T scalar, mat<2, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator*(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<2, 2, T, P>::col_type operator*(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator*(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL typename mat<2, 2, T, P>::row_type operator*(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat4x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator/(T scalar, tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator/(T scalar, mat<2, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<2, 2, T, P>::col_type operator/(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator/(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL typename mat<2, 2, T, P>::row_type operator/(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
 } //namespace glm
 } //namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 77 - 77
glm/detail/type_mat2x2.inl

@@ -9,7 +9,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()
+		GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0);
 				this->value[0] = col_type(1, 0);
@@ -20,7 +20,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, T, P> const& m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -29,25 +29,25 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, T, Q> const& m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat2x2<T, P>::tmat2x2(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 2, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(T scalar)
 	{
 	{
 		this->value[0] = col_type(scalar, 0);
 		this->value[0] = col_type(scalar, 0);
 		this->value[1] = col_type(0, scalar);
 		this->value[1] = col_type(0, scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat 
 	(
 	(
 		T const & x0, T const & y0,
 		T const & x0, T const & y0,
 		T const & x1, T const & y1
 		T const & x1, T const & y1
@@ -58,7 +58,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(col_type const & v0, col_type const & v1)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(col_type const& v0, col_type const& v1)
 	{
 	{
 		this->value[0] = v0;
 		this->value[0] = v0;
 		this->value[1] = v1;
 		this->value[1] = v1;
@@ -68,7 +68,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename X1, typename Y1, typename X2, typename Y2>
 	template <typename X1, typename Y1, typename X2, typename Y2>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat 
 	(
 	(
 		X1 const & x1, Y1 const & y1,
 		X1 const & x1, Y1 const & y1,
 		X2 const & x2, Y2 const & y2
 		X2 const & x2, Y2 const & y2
@@ -80,7 +80,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2>
 	template <typename V1, typename V2>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(vec<2, V1, P> const & v1, vec<2, V2, P> const & v2)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(vec<2, V1, P> const& v1, vec<2, V2, P> const& v2)
 	{
 	{
 		this->value[0] = col_type(v1);
 		this->value[0] = col_type(v1);
 		this->value[1] = col_type(v2);
 		this->value[1] = col_type(v2);
@@ -90,63 +90,63 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, U, Q> const& m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 3, T, P> const& m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 4, T, P> const& m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 3, T, P> const& m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 2, T, P> const& m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 4, T, P> const& m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 2, T, P> const& m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 4, T, P> const& m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 3, T, P> const& m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -155,14 +155,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type& mat<2, 2, T, P>::operator[](typename mat<2, 2, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type const& mat<2, 2, T, P>::operator[](typename mat<2, 2, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -172,7 +172,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator=(mat<2, 2, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -182,7 +182,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator=(mat<2, 2, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -191,7 +191,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+=(U scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator+=(U scalar)
 	{
 	{
 		this->value[0] += scalar;
 		this->value[0] += scalar;
 		this->value[1] += scalar;
 		this->value[1] += scalar;
@@ -200,7 +200,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+=(tmat2x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator+=(mat<2, 2, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -209,7 +209,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-=(U scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator-=(U scalar)
 	{
 	{
 		this->value[0] -= scalar;
 		this->value[0] -= scalar;
 		this->value[1] -= scalar;
 		this->value[1] -= scalar;
@@ -218,7 +218,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-=(tmat2x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator-=(mat<2, 2, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -227,7 +227,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*=(U scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator*=(U scalar)
 	{
 	{
 		this->value[0] *= scalar;
 		this->value[0] *= scalar;
 		this->value[1] *= scalar;
 		this->value[1] *= scalar;
@@ -236,14 +236,14 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*=(tmat2x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator*=(mat<2, 2, U, P> const & m)
 	{
 	{
 		return (*this = *this * m);
 		return (*this = *this * m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/=(U scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator/=(U scalar)
 	{
 	{
 		this->value[0] /= scalar;
 		this->value[0] /= scalar;
 		this->value[1] /= scalar;
 		this->value[1] /= scalar;
@@ -252,7 +252,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/=(tmat2x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator/=(mat<2, 2, U, P> const & m)
 	{
 	{
 		return *this *= inverse(m);
 		return *this *= inverse(m);
 	}
 	}
@@ -260,7 +260,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -268,7 +268,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -276,17 +276,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> mat<2, 2, T, P>::operator++(int)
 	{
 	{
-		tmat2x2<T, P> Result(*this);
+		mat<2, 2, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> mat<2, 2, T, P>::operator--(int)
 	{
 	{
-		tmat2x2<T, P> Result(*this);
+		mat<2, 2, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -294,15 +294,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			-m[0], 
 			-m[0], 
 			-m[1]);
 			-m[1]);
 	}
 	}
@@ -310,74 +310,74 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar);
 			m[1] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(T scalar, tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(T scalar, mat<2, 2, T, P> const & m)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar);
 			m[1] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1]);
 			m1[1] + m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m[0] - scalar,
 			m[0] - scalar,
 			m[1] - scalar);
 			m[1] - scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(T scalar, tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(T scalar, mat<2, 2, T, P> const & m)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			scalar - m[0],
 			scalar - m[0],
 			scalar - m[1]);
 			scalar - m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1]);
 			m1[1] - m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat2x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar);
 			m[1] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(T scalar, tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(T scalar, mat<2, 2, T, P> const & m)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar);
 			m[1] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator*
+	GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type operator*
 	(
 	(
-		tmat2x2<T, P> const & m,
-		typename tmat2x2<T, P>::row_type const & v
+		mat<2, 2, T, P> const& m,
+		typename mat<2, 2, T, P>::row_type const & v
 	)
 	)
 	{
 	{
 		return vec<2, T, P>(
 		return vec<2, T, P>(
@@ -386,10 +386,10 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator*
+	GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::row_type operator*
 	(
 	(
-		typename tmat2x2<T, P>::col_type const & v,
-		tmat2x2<T, P> const & m
+		typename mat<2, 2, T, P>::col_type const & v,
+		mat<2, 2, T, P> const& m
 	)
 	)
 	{
 	{
 		return vec<2, T, P>(
 		return vec<2, T, P>(
@@ -398,9 +398,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
@@ -408,9 +408,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
@@ -420,9 +420,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
@@ -434,50 +434,50 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(tmat2x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			m[0] / scalar,
 			m[0] / scalar,
 			m[1] / scalar);
 			m[1] / scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(T scalar, tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(T scalar, mat<2, 2, T, P> const & m)
 	{
 	{
-		return tmat2x2<T, P>(
+		return mat<2, 2, T, P>(
 			scalar / m[0],
 			scalar / m[0],
 			scalar / m[1]);
 			scalar / m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v)
+	GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type operator/(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v)
 	{
 	{
 		return inverse(m) * v;
 		return inverse(m) * v;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator/(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::row_type operator/(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m)
 	{
 	{
 		return v *  inverse(m);
 		return v *  inverse(m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{	
 	{	
-		tmat2x2<T, P> m1_copy(m1);
+		mat<2, 2, T, P> m1_copy(m1);
 		return m1_copy /= m2;
 		return m1_copy /= m2;
 	}
 	}
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]);
 	}
 	}

+ 51 - 51
glm/detail/type_mat2x3.hpp

@@ -12,13 +12,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat2x3
+	template <typename T, precision P>
+	struct mat<2, 3, T, P>
 	{
 	{
 		typedef vec<3, T, P> col_type;
 		typedef vec<3, T, P> col_type;
 		typedef vec<2, T, P> row_type;
 		typedef vec<2, T, P> row_type;
-		typedef tmat2x3<T, P> type;
-		typedef tmat3x2<T, P> transpose_type;
+		typedef mat<2, 3, T, P> type;
+		typedef mat<3, 2, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -27,45 +27,45 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat2x3() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<2, 3, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<2, 3, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x3(ctor);
-		GLM_FUNC_DECL explicit tmat2x3(T scalar);
-		GLM_FUNC_DECL tmat2x3(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T scalar);
+		GLM_FUNC_DECL mat(
 			T x0, T y0, T z0,
 			T x0, T y0, T z0,
 			T x1, T y1, T z1);
 			T x1, T y1, T z1);
-		GLM_FUNC_DECL tmat2x3(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1);
 			col_type const & v1);
 
 
 		// -- Conversions --
 		// -- Conversions --
 
 
 		template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
 		template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
-		GLM_FUNC_DECL tmat2x3(
+		GLM_FUNC_DECL mat(
 			X1 x1, Y1 y1, Z1 z1,
 			X1 x1, Y1 y1, Z1 z1,
 			X2 x2, Y2 y2, Z2 z2);
 			X2 x2, Y2 y2, Z2 z2);
 
 
 		template <typename U, typename V>
 		template <typename U, typename V>
-		GLM_FUNC_DECL tmat2x3(
+		GLM_FUNC_DECL mat(
 			vec<3, U, P> const & v1,
 			vec<3, U, P> const & v1,
 			vec<3, V, P> const & v2);
 			vec<3, V, P> const & v2);
 
 
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x3<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x3<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -77,87 +77,87 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator=(mat<2, 3, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator=(mat<2, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x3<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x3<T, P> & operator+=(tmat2x3<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator+=(mat<2, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x3<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x3<T, P> & operator-=(tmat2x3<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator-=(mat<2, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x3<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x3<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator/=(U s);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat2x3<T, P> & operator++ ();
-		GLM_FUNC_DECL tmat2x3<T, P> & operator-- ();
-		GLM_FUNC_DECL tmat2x3<T, P> operator++(int);
-		GLM_FUNC_DECL tmat2x3<T, P> operator--(int);
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator++ ();
+		GLM_FUNC_DECL mat<2, 3, T, P> & operator-- ();
+		GLM_FUNC_DECL mat<2, 3, T, P> operator++(int);
+		GLM_FUNC_DECL mat<2, 3, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator*(T scalar, tmat2x3<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator*(T scalar, mat<2, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator*(tmat2x3<T, P> const & m, typename tmat2x3<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<2, 3, T, P>::col_type operator*(mat<2, 3, T, P> const & m, typename mat<2, 3, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator*(typename tmat2x3<T, P>::col_type const & v, tmat2x3<T, P> const & m);
+	GLM_FUNC_DECL typename mat<2, 3, T, P>::row_type operator*(typename mat<2, 3, T, P>::col_type const & v, mat<2, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<2, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<3, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<4, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator/(mat<2, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator/(T scalar, tmat2x3<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator/(T scalar, mat<2, 3, T, P> const & m);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
 }//namespace glm
 }//namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 69 - 69
glm/detail/type_mat2x3.inl

@@ -7,7 +7,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P> 
 		template <typename T, precision P> 
-		GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()
+		GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0, 0);
 				this->value[0] = col_type(1, 0, 0);
@@ -18,7 +18,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, T, P> const & m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -27,25 +27,25 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, T, Q> const & m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat2x3<T, P>::tmat2x3(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 3, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(T scalar)
 	{
 	{
 		this->value[0] = col_type(scalar, 0, 0);
 		this->value[0] = col_type(scalar, 0, 0);
 		this->value[1] = col_type(0, scalar, 0);
 		this->value[1] = col_type(0, scalar, 0);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat 
 	(
 	(
 		T x0, T y0, T z0,
 		T x0, T y0, T z0,
 		T x1, T y1, T z1
 		T x1, T y1, T z1
@@ -56,7 +56,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(col_type const & v0, col_type const & v1)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(col_type const & v0, col_type const & v1)
 	{
 	{
 		this->value[0] = v0;
 		this->value[0] = v0;
 		this->value[1] = v1;
 		this->value[1] = v1;
@@ -68,7 +68,7 @@ namespace glm
 	template <
 	template <
 		typename X1, typename Y1, typename Z1,
 		typename X1, typename Y1, typename Z1,
 		typename X2, typename Y2, typename Z2>
 		typename X2, typename Y2, typename Z2>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat 
 	(
 	(
 		X1 x1, Y1 y1, Z1 z1,
 		X1 x1, Y1 y1, Z1 z1,
 		X2 x2, Y2 y2, Z2 z2
 		X2 x2, Y2 y2, Z2 z2
@@ -80,7 +80,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2>
 	template <typename V1, typename V2>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(vec<3, V1, P> const & v1, vec<3, V2, P> const & v2)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(vec<3, V1, P> const & v1, vec<3, V2, P> const & v2)
 	{
 	{
 		this->value[0] = col_type(v1);
 		this->value[0] = col_type(v1);
 		this->value[1] = col_type(v2);
 		this->value[1] = col_type(v2);
@@ -90,63 +90,63 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, U, Q> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER  tmat2x3<T, P>::tmat2x3(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER  mat<2, 3, T, P>::mat(mat<3, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -155,14 +155,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type & mat<2, 3, T, P>::operator[](typename mat<2, 3, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type const & mat<2, 3, T, P>::operator[](typename mat<2, 3, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -172,7 +172,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator=(mat<2, 3, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -182,7 +182,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator=(mat<2, 3, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -191,7 +191,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -200,7 +200,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator+=(tmat2x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator+=(mat<2, 3, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -209,7 +209,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -218,7 +218,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-=(tmat2x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator-=(mat<2, 3, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -227,7 +227,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -236,7 +236,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -246,7 +246,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -254,7 +254,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -262,17 +262,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> mat<2, 3, T, P>::operator++(int)
 	{
 	{
-		tmat2x3<T, P> Result(*this);
+		mat<2, 3, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> mat<2, 3, T, P>::operator--(int)
 	{
 	{
-		tmat2x3<T, P> Result(*this);
+		mat<2, 3, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -280,15 +280,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			-m[0],
 			-m[0],
 			-m[1]);
 			-m[1]);
 	}
 	}
@@ -296,80 +296,80 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar);
 			m[1] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1]);
 			m1[1] + m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m[0] - scalar,
 			m[0] - scalar,
 			m[1] - scalar);
 			m[1] - scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1]);
 			m1[1] - m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar);
 			m[1] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(T scalar, tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(T scalar, mat<2, 3, T, P> const & m)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar);
 			m[1] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type operator*
+	GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type operator*
 	(
 	(
-		tmat2x3<T, P> const & m,
-		typename tmat2x3<T, P>::row_type const & v)
+		mat<2, 3, T, P> const& m,
+		typename mat<2, 3, T, P>::row_type const & v)
 	{
 	{
-		return typename tmat2x3<T, P>::col_type(
+		return typename mat<2, 3, T, P>::col_type(
 			m[0][0] * v.x + m[1][0] * v.y,
 			m[0][0] * v.x + m[1][0] * v.y,
 			m[0][1] * v.x + m[1][1] * v.y,
 			m[0][1] * v.x + m[1][1] * v.y,
 			m[0][2] * v.x + m[1][2] * v.y);
 			m[0][2] * v.x + m[1][2] * v.y);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::row_type operator*
+	GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::row_type operator*
 	(
 	(
-		typename tmat2x3<T, P>::col_type const & v,
-		tmat2x3<T, P> const & m)
+		typename mat<2, 3, T, P>::col_type const & v,
+		mat<2, 3, T, P> const& m)
 	{
 	{
-		return typename tmat2x3<T, P>::row_type(
+		return typename mat<2, 3, T, P>::row_type(
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]);
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
@@ -379,7 +379,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<3, 2, T, P> const & m2)
 	{
 	{
 		T SrcA00 = m1[0][0];
 		T SrcA00 = m1[0][0];
 		T SrcA01 = m1[0][1];
 		T SrcA01 = m1[0][1];
@@ -395,7 +395,7 @@ namespace glm
 		T SrcB20 = m2[2][0];
 		T SrcB20 = m2[2][0];
 		T SrcB21 = m2[2][1];
 		T SrcB21 = m2[2][1];
 
 
-		tmat3x3<T, P> Result(uninitialize);
+		mat<3, 3, T, P> Result(uninitialize);
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
@@ -409,9 +409,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<4, 2, T, P> const & m2)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
@@ -427,17 +427,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator/(mat<2, 3, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m[0] / scalar,
 			m[0] / scalar,
 			m[1] / scalar);
 			m[1] / scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(T scalar, tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator/(T scalar, mat<2, 3, T, P> const & m)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			scalar / m[0],
 			scalar / m[0],
 			scalar / m[1]);
 			scalar / m[1]);
 	}
 	}
@@ -445,13 +445,13 @@ namespace glm
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]);
 	}
 	}

+ 51 - 51
glm/detail/type_mat2x4.hpp

@@ -12,13 +12,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat2x4
+	template <typename T, precision P>
+	struct mat<2, 4, T, P>
 	{
 	{
 		typedef vec<4, T, P> col_type;
 		typedef vec<4, T, P> col_type;
 		typedef vec<2, T, P> row_type;
 		typedef vec<2, T, P> row_type;
-		typedef tmat2x4<T, P> type;
-		typedef tmat4x2<T, P> transpose_type;
+		typedef mat<2, 4, T, P> type;
+		typedef mat<4, 2, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -27,17 +27,17 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat2x4() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<2, 4, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<2, 4, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat2x4(ctor);
-		GLM_FUNC_DECL explicit tmat2x4(T scalar);
-		GLM_FUNC_DECL tmat2x4(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T scalar);
+		GLM_FUNC_DECL mat(
 			T x0, T y0, T z0, T w0,
 			T x0, T y0, T z0, T w0,
 			T x1, T y1, T z1, T w1);
 			T x1, T y1, T z1, T w1);
-		GLM_FUNC_DECL tmat2x4(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1);
 			col_type const & v1);
 
 
@@ -46,28 +46,28 @@ namespace glm
 		template <
 		template <
 			typename X1, typename Y1, typename Z1, typename W1,
 			typename X1, typename Y1, typename Z1, typename W1,
 			typename X2, typename Y2, typename Z2, typename W2>
 			typename X2, typename Y2, typename Z2, typename W2>
-		GLM_FUNC_DECL tmat2x4(
+		GLM_FUNC_DECL mat(
 			X1 x1, Y1 y1, Z1 z1, W1 w1,
 			X1 x1, Y1 y1, Z1 z1, W1 w1,
 			X2 x2, Y2 y2, Z2 z2, W2 w2);
 			X2 x2, Y2 y2, Z2 z2, W2 w2);
 
 
 		template <typename U, typename V>
 		template <typename U, typename V>
-		GLM_FUNC_DECL tmat2x4(
+		GLM_FUNC_DECL mat(
 			vec<4, U, P> const & v1,
 			vec<4, U, P> const & v1,
 			vec<4, V, P> const & v2);
 			vec<4, V, P> const & v2);
 
 
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x4<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x3<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -79,87 +79,87 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator=(mat<2, 4, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator=(mat<2, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x4<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x4<T, P> & operator+=(tmat2x4<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator+=(mat<2, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x4<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x4<T, P> & operator-=(tmat2x4<U, P> const & m);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator-=(mat<2, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x4<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat2x4<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator/=(U s);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat2x4<T, P> & operator++ ();
-		GLM_FUNC_DECL tmat2x4<T, P> & operator-- ();
-		GLM_FUNC_DECL tmat2x4<T, P> operator++(int);
-		GLM_FUNC_DECL tmat2x4<T, P> operator--(int);
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator++ ();
+		GLM_FUNC_DECL mat<2, 4, T, P> & operator-- ();
+		GLM_FUNC_DECL mat<2, 4, T, P> operator++(int);
+		GLM_FUNC_DECL mat<2, 4, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator*(T scalar, tmat2x4<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator*(T scalar, mat<2, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<2, 4, T, P>::col_type operator*(mat<2, 4, T, P> const & m, typename mat<2, 4, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator*(typename tmat2x4<T, P>::col_type const & v, tmat2x4<T, P> const & m);
+	GLM_FUNC_DECL typename mat<2, 4, T, P>::row_type operator*(typename mat<2, 4, T, P>::col_type const & v, mat<2, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<4, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<2, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<3, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator/(mat<2, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator/(T scalar, tmat2x4<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator/(T scalar, mat<2, 4, T, P> const & m);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
 }//namespace glm
 }//namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 65 - 65
glm/detail/type_mat2x4.inl

@@ -7,7 +7,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()
+		GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0, 0, 0);
 				this->value[0] = col_type(1, 0, 0, 0);
@@ -18,7 +18,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, T, P> const & m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -27,18 +27,18 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, T, Q> const & m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat2x4<T, P>::tmat2x4(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 4, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(T scalar)
 	{
 	{
 		value_type const Zero(0);
 		value_type const Zero(0);
 		this->value[0] = col_type(scalar, Zero, Zero, Zero);
 		this->value[0] = col_type(scalar, Zero, Zero, Zero);
@@ -46,7 +46,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat
 	(
 	(
 		T x0, T y0, T z0, T w0,
 		T x0, T y0, T z0, T w0,
 		T x1, T y1, T z1, T w1
 		T x1, T y1, T z1, T w1
@@ -57,7 +57,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(col_type const & v0, col_type const & v1)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(col_type const & v0, col_type const & v1)
 	{
 	{
 		this->value[0] = v0;
 		this->value[0] = v0;
 		this->value[1] = v1;
 		this->value[1] = v1;
@@ -69,7 +69,7 @@ namespace glm
 	template <
 	template <
 		typename X1, typename Y1, typename Z1, typename W1,
 		typename X1, typename Y1, typename Z1, typename W1,
 		typename X2, typename Y2, typename Z2, typename W2>
 		typename X2, typename Y2, typename Z2, typename W2>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat
 	(
 	(
 		X1 x1, Y1 y1, Z1 z1, W1 w1,
 		X1 x1, Y1 y1, Z1 z1, W1 w1,
 		X2 x2, Y2 y2, Z2 z2, W2 w2
 		X2 x2, Y2 y2, Z2 z2, W2 w2
@@ -81,7 +81,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2>
 	template <typename V1, typename V2>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(vec<4, V1, P> const & v1, vec<4, V2, P> const & v2)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(vec<4, V1, P> const & v1, vec<4, V2, P> const & v2)
 	{
 	{
 		this->value[0] = col_type(v1);
 		this->value[0] = col_type(v1);
 		this->value[1] = col_type(v2);
 		this->value[1] = col_type(v2);
@@ -91,63 +91,63 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, U, Q> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -156,14 +156,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type & mat<2, 4, T, P>::operator[](typename mat<2, 4, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type const & mat<2, 4, T, P>::operator[](typename mat<2, 4, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -173,7 +173,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator=(mat<2, 4, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -183,7 +183,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator=(mat<2, 4, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -192,7 +192,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -201,7 +201,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+=(tmat2x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator+=(mat<2, 4, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -210,7 +210,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -219,7 +219,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-=(tmat2x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator-=(mat<2, 4, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -228,7 +228,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -237,7 +237,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> & tmat2x4<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> & mat<2, 4, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -247,7 +247,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -255,7 +255,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -263,17 +263,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat<2, 4, T, P>::operator++(int)
 	{
 	{
-		tmat2x4<T, P> Result(*this);
+		mat<2, 4, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat<2, 4, T, P>::operator--(int)
 	{
 	{
-		tmat2x4<T, P> Result(*this);
+		mat<2, 4, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -281,15 +281,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			-m[0], 
 			-m[0], 
 			-m[1]);
 			-m[1]);
 	}
 	}
@@ -297,57 +297,57 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar);
 			m[1] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1]);
 			m1[1] + m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m[0] - scalar,
 			m[0] - scalar,
 			m[1] - scalar);
 			m[1] - scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1]);
 			m1[1] - m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar);
 			m[1] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(T scalar, tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(T scalar, mat<2, 4, T, P> const & m)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar);
 			m[1] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v)
+	GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type operator*(mat<2, 4, T, P> const & m, typename mat<2, 4, T, P>::row_type const & v)
 	{
 	{
-		return typename tmat2x4<T, P>::col_type(
+		return typename mat<2, 4, T, P>::col_type(
 			m[0][0] * v.x + m[1][0] * v.y,
 			m[0][0] * v.x + m[1][0] * v.y,
 			m[0][1] * v.x + m[1][1] * v.y,
 			m[0][1] * v.x + m[1][1] * v.y,
 			m[0][2] * v.x + m[1][2] * v.y,
 			m[0][2] * v.x + m[1][2] * v.y,
@@ -355,15 +355,15 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::row_type operator*(typename tmat2x4<T, P>::col_type const & v, tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::row_type operator*(typename mat<2, 4, T, P>::col_type const & v, mat<2, 4, T, P> const & m)
 	{
 	{
-		return typename tmat2x4<T, P>::row_type(
+		return typename mat<2, 4, T, P>::row_type(
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]);
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<4, 2, T, P> const & m2)
 	{
 	{
 		T SrcA00 = m1[0][0];
 		T SrcA00 = m1[0][0];
 		T SrcA01 = m1[0][1];
 		T SrcA01 = m1[0][1];
@@ -383,7 +383,7 @@ namespace glm
 		T SrcB30 = m2[3][0];
 		T SrcB30 = m2[3][0];
 		T SrcB31 = m2[3][1];
 		T SrcB31 = m2[3][1];
 
 
-		tmat4x4<T, P> Result(uninitialize);
+		mat<4, 4, T, P> Result(uninitialize);
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
@@ -404,9 +404,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<2, 2, T, P> const & m2)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
@@ -418,9 +418,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<3, 2, T, P> const & m2)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
@@ -436,17 +436,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator/(mat<2, 4, T, P> const & m, T scalar)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m[0] / scalar,
 			m[0] / scalar,
 			m[1] / scalar);
 			m[1] / scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(T scalar, tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator/(T scalar, mat<2, 4, T, P> const & m)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			scalar / m[0],
 			scalar / m[0],
 			scalar / m[1]);
 			scalar / m[1]);
 	}
 	}
@@ -454,13 +454,13 @@ namespace glm
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]);
 	}
 	}

+ 51 - 51
glm/detail/type_mat3x2.hpp

@@ -12,13 +12,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat3x2
+	template <typename T, precision P>
+	struct mat<3, 2, T, P>
 	{
 	{
 		typedef vec<2, T, P> col_type;
 		typedef vec<2, T, P> col_type;
 		typedef vec<3, T, P> row_type;
 		typedef vec<3, T, P> row_type;
-		typedef tmat3x2<T, P> type;
-		typedef tmat2x3<T, P> transpose_type;
+		typedef mat<3, 2, T, P> type;
+		typedef mat<2, 3, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -27,18 +27,18 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat3x2() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<3, 2, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<3, 2, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat3x2(ctor);
-		GLM_FUNC_DECL explicit tmat3x2(T scalar);
-		GLM_FUNC_DECL tmat3x2(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T scalar);
+		GLM_FUNC_DECL mat(
 			T x0, T y0,
 			T x0, T y0,
 			T x1, T y1,
 			T x1, T y1,
 			T x2, T y2);
 			T x2, T y2);
-		GLM_FUNC_DECL tmat3x2(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1,
 			col_type const & v1,
 			col_type const & v2);
 			col_type const & v2);
@@ -49,13 +49,13 @@ namespace glm
 			typename X1, typename Y1,
 			typename X1, typename Y1,
 			typename X2, typename Y2,
 			typename X2, typename Y2,
 			typename X3, typename Y3>
 			typename X3, typename Y3>
-		GLM_FUNC_DECL tmat3x2(
+		GLM_FUNC_DECL mat(
 			X1 x1, Y1 y1,
 			X1 x1, Y1 y1,
 			X2 x2, Y2 y2,
 			X2 x2, Y2 y2,
 			X3 x3, Y3 y3);
 			X3 x3, Y3 y3);
 
 
 		template <typename V1, typename V2, typename V3>
 		template <typename V1, typename V2, typename V3>
-		GLM_FUNC_DECL tmat3x2(
+		GLM_FUNC_DECL mat(
 			vec<2, V1, P> const & v1,
 			vec<2, V1, P> const & v1,
 			vec<2, V2, P> const & v2,
 			vec<2, V2, P> const & v2,
 			vec<2, V3, P> const & v3);
 			vec<2, V3, P> const & v3);
@@ -63,16 +63,16 @@ namespace glm
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x2<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x3<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -84,87 +84,87 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator=(mat<3, 2, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator=(mat<3, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x2<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x2<T, P> & operator+=(tmat3x2<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator+=(mat<3, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x2<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x2<T, P> & operator-=(tmat3x2<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator-=(mat<3, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x2<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x2<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator/=(U s);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat3x2<T, P> & operator++ ();
-		GLM_FUNC_DECL tmat3x2<T, P> & operator-- ();
-		GLM_FUNC_DECL tmat3x2<T, P> operator++(int);
-		GLM_FUNC_DECL tmat3x2<T, P> operator--(int);
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator++ ();
+		GLM_FUNC_DECL mat<3, 2, T, P> & operator-- ();
+		GLM_FUNC_DECL mat<3, 2, T, P> operator++(int);
+		GLM_FUNC_DECL mat<3, 2, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator*(T scalar, tmat3x2<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator*(T scalar, mat<3, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator*(tmat3x2<T, P> const & m, typename tmat3x2<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<3, 2, T, P>::col_type operator*(mat<3, 2, T, P> const & m, typename mat<3, 2, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator*(typename tmat3x2<T, P>::col_type const & v, tmat3x2<T, P> const & m);
+	GLM_FUNC_DECL typename mat<3, 2, T, P>::row_type operator*(typename mat<3, 2, T, P>::col_type const & v, mat<3, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat2x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<2, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<3, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<4, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator/(mat<3, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator/(T scalar, tmat3x2<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator/(T scalar, mat<3, 2, T, P> const & m);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
 
 
 }//namespace glm
 }//namespace glm
 
 

+ 65 - 65
glm/detail/type_mat3x2.inl

@@ -7,7 +7,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P> 
 		template <typename T, precision P> 
-		GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()
+		GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0);
 				this->value[0] = col_type(1, 0);
@@ -19,7 +19,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, T, P> const & m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -29,7 +29,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, T, Q> const & m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
@@ -37,11 +37,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat3x2<T, P>::tmat3x2(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 2, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(T scalar)
 	{
 	{
 		this->value[0] = col_type(scalar, 0);
 		this->value[0] = col_type(scalar, 0);
 		this->value[1] = col_type(0, scalar);
 		this->value[1] = col_type(0, scalar);
@@ -49,7 +49,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat
 	(
 	(
 		T x0, T y0,
 		T x0, T y0,
 		T x1, T y1,
 		T x1, T y1,
@@ -62,7 +62,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat
 	(
 	(
 		col_type const & v0,
 		col_type const & v0,
 		col_type const & v1,
 		col_type const & v1,
@@ -81,7 +81,7 @@ namespace glm
 		typename X1, typename Y1,
 		typename X1, typename Y1,
 		typename X2, typename Y2,
 		typename X2, typename Y2,
 		typename X3, typename Y3>
 		typename X3, typename Y3>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat
 	(
 	(
 		X1 x1, Y1 y1,
 		X1 x1, Y1 y1,
 		X2 x2, Y2 y2,
 		X2 x2, Y2 y2,
@@ -95,7 +95,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2, typename V3>
 	template <typename V1, typename V2, typename V3>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat
 	(
 	(
 		vec<2, V1, P> const & v1,
 		vec<2, V1, P> const & v1,
 		vec<2, V2, P> const & v2,
 		vec<2, V2, P> const & v2,
@@ -111,7 +111,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, U, Q> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -119,7 +119,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -127,7 +127,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -135,7 +135,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -143,7 +143,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -151,7 +151,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -159,7 +159,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -167,7 +167,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -175,7 +175,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -185,14 +185,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type & mat<3, 2, T, P>::operator[](typename mat<3, 2, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type const & mat<3, 2, T, P>::operator[](typename mat<3, 2, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -202,7 +202,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator=(mat<3, 2, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -213,7 +213,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator=(mat<3, 2, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -223,7 +223,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -233,7 +233,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+=(tmat3x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator+=(mat<3, 2, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -243,7 +243,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -253,7 +253,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-=(tmat3x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator-=(mat<3, 2, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -263,7 +263,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -273,7 +273,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> & tmat3x2<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> & mat<3, 2, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -284,7 +284,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -293,7 +293,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -302,17 +302,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> mat<3, 2, T, P>::operator++(int)
 	{
 	{
-		tmat3x2<T, P> Result(*this);
+		mat<3, 2, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> mat<3, 2, T, P>::operator--(int)
 	{
 	{
-		tmat3x2<T, P> Result(*this);
+		mat<3, 2, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -320,15 +320,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			-m[0],
 			-m[0],
 			-m[1],
 			-m[1],
 			-m[2]);
 			-m[2]);
@@ -337,78 +337,78 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar,
 			m[1] + scalar,
 			m[2] + scalar);
 			m[2] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1],
 			m1[1] + m2[1],
 			m1[2] + m2[2]);
 			m1[2] + m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m[0] - scalar,
 			m[0] - scalar,
 			m[1] - scalar,
 			m[1] - scalar,
 			m[2] - scalar);
 			m[2] - scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1],
 			m1[1] - m2[1],
 			m1[2] - m2[2]);
 			m1[2] - m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar);
 			m[2] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(T scalar, tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(T scalar, mat<3, 2, T, P> const & m)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar);
 			m[2] * scalar);
 	}
 	}
    
    
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type operator*(tmat3x2<T, P> const & m, typename tmat3x2<T, P>::row_type const & v)
+	GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type operator*(mat<3, 2, T, P> const & m, typename mat<3, 2, T, P>::row_type const & v)
 	{
 	{
-		return typename tmat3x2<T, P>::col_type(
+		return typename mat<3, 2, T, P>::col_type(
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z);
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::row_type operator*(typename tmat3x2<T, P>::col_type const & v, tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::row_type operator*(typename mat<3, 2, T, P>::col_type const & v, mat<3, 2, T, P> const & m)
 	{
 	{
-		return typename tmat3x2<T, P>::row_type(
+		return typename mat<3, 2, T, P>::row_type(
 			v.x * m[0][0] + v.y * m[0][1],
 			v.x * m[0][0] + v.y * m[0][1],
 			v.x * m[1][0] + v.y * m[1][1],
 			v.x * m[1][0] + v.y * m[1][1],
 			v.x * m[2][0] + v.y * m[2][1]);
 			v.x * m[2][0] + v.y * m[2][1]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat2x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<2, 3, T, P> const & m2)
 	{
 	{
 		const T SrcA00 = m1[0][0];
 		const T SrcA00 = m1[0][0];
 		const T SrcA01 = m1[0][1];
 		const T SrcA01 = m1[0][1];
@@ -424,7 +424,7 @@ namespace glm
 		const T SrcB11 = m2[1][1];
 		const T SrcB11 = m2[1][1];
 		const T SrcB12 = m2[1][2];
 		const T SrcB12 = m2[1][2];
 
 
-		tmat2x2<T, P> Result(uninitialize);
+		mat<2, 2, T, P> Result(uninitialize);
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
 		Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;
 		Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;
@@ -433,9 +433,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
@@ -445,9 +445,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<4, 3, T, P> const & m2)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
@@ -459,18 +459,18 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator/(mat<3, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m[0] / scalar,
 			m[0] / scalar,
 			m[1] / scalar,
 			m[1] / scalar,
 			m[2] / scalar);
 			m[2] / scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(T scalar, tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator/(T scalar, mat<3, 2, T, P> const & m)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			scalar / m[0],
 			scalar / m[0],
 			scalar / m[1],
 			scalar / m[1],
 			scalar / m[2]);
 			scalar / m[2]);
@@ -479,13 +479,13 @@ namespace glm
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER bool operator!=(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
 	}
 	}

+ 58 - 58
glm/detail/type_mat3x3.hpp

@@ -11,13 +11,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat3x3
+	template <typename T, precision P>
+	struct mat<3, 3, T, P>
 	{
 	{
 		typedef vec<3, T, P> col_type;
 		typedef vec<3, T, P> col_type;
 		typedef vec<3, T, P> row_type;
 		typedef vec<3, T, P> row_type;
-		typedef tmat3x3<T, P> type;
-		typedef tmat3x3<T, P> transpose_type;
+		typedef mat<3, 3, T, P> type;
+		typedef mat<3, 3, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -26,18 +26,18 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat3x3() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<3, 3, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<3, 3, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat3x3(ctor);
-		GLM_FUNC_DECL explicit tmat3x3(T scalar);
-		GLM_FUNC_DECL tmat3x3(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T scalar);
+		GLM_FUNC_DECL mat(
 			T x0, T y0, T z0,
 			T x0, T y0, T z0,
 			T x1, T y1, T z1,
 			T x1, T y1, T z1,
 			T x2, T y2, T z2);
 			T x2, T y2, T z2);
-		GLM_FUNC_DECL tmat3x3(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1,
 			col_type const & v1,
 			col_type const & v2);
 			col_type const & v2);
@@ -48,13 +48,13 @@ namespace glm
 			typename X1, typename Y1, typename Z1,
 			typename X1, typename Y1, typename Z1,
 			typename X2, typename Y2, typename Z2,
 			typename X2, typename Y2, typename Z2,
 			typename X3, typename Y3, typename Z3>
 			typename X3, typename Y3, typename Z3>
-		GLM_FUNC_DECL tmat3x3(
+		GLM_FUNC_DECL mat(
 			X1 x1, Y1 y1, Z1 z1,
 			X1 x1, Y1 y1, Z1 z1,
 			X2 x2, Y2 y2, Z2 z2,
 			X2 x2, Y2 y2, Z2 z2,
 			X3 x3, Y3 y3, Z3 z3);
 			X3 x3, Y3 y3, Z3 z3);
 
 
 		template <typename V1, typename V2, typename V3>
 		template <typename V1, typename V2, typename V3>
-		GLM_FUNC_DECL tmat3x3(
+		GLM_FUNC_DECL mat(
 			vec<3, V1, P> const & v1,
 			vec<3, V1, P> const & v1,
 			vec<3, V2, P> const & v2,
 			vec<3, V2, P> const & v2,
 			vec<3, V3, P> const & v3);
 			vec<3, V3, P> const & v3);
@@ -62,16 +62,16 @@ namespace glm
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x3<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x3<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -83,106 +83,106 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator=(mat<3, 3, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator=(mat<3, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator+=(tmat3x3<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator+=(mat<3, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator-=(tmat3x3<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator-=(mat<3, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator*=(tmat3x3<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator*=(mat<3, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator/=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x3<T, P> & operator/=(tmat3x3<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator/=(mat<3, 3, U, P> const & m);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat3x3<T, P> & operator++();
-		GLM_FUNC_DECL tmat3x3<T, P> & operator--();
-		GLM_FUNC_DECL tmat3x3<T, P> operator++(int);
-		GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator++();
+		GLM_FUNC_DECL mat<3, 3, T, P> & operator--();
+		GLM_FUNC_DECL mat<3, 3, T, P> operator++(int);
+		GLM_FUNC_DECL mat<3, 3, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator+(T scalar, tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator+(T scalar, mat<3, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator-(T scalar, tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator-(T scalar, mat<3, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator*(T scalar, tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator*(T scalar, mat<3, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator*(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<3, 3, T, P>::col_type operator*(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator*(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL typename mat<3, 3, T, P>::row_type operator*(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator/(T scalar, tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator/(T scalar, mat<3, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<3, 3, T, P>::col_type operator/(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL typename mat<3, 3, T, P>::row_type operator/(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
 }//namespace glm
 }//namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 75 - 75
glm/detail/type_mat3x3.inl

@@ -9,7 +9,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()
+		GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0, 0);
 				this->value[0] = col_type(1, 0, 0);
@@ -21,7 +21,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, T, P> const & m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -31,7 +31,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, T, Q> const & m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
@@ -39,11 +39,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat3x3<T, P>::tmat3x3(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 3, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(T scalar)
 	{
 	{
 		this->value[0] = col_type(scalar, 0, 0);
 		this->value[0] = col_type(scalar, 0, 0);
 		this->value[1] = col_type(0, scalar, 0);
 		this->value[1] = col_type(0, scalar, 0);
@@ -51,7 +51,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat
 	(
 	(
 		T x0, T y0, T z0,
 		T x0, T y0, T z0,
 		T x1, T y1, T z1,
 		T x1, T y1, T z1,
@@ -64,7 +64,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat
 	(
 	(
 		col_type const & v0,
 		col_type const & v0,
 		col_type const & v1,
 		col_type const & v1,
@@ -83,7 +83,7 @@ namespace glm
 		typename X1, typename Y1, typename Z1,
 		typename X1, typename Y1, typename Z1,
 		typename X2, typename Y2, typename Z2,
 		typename X2, typename Y2, typename Z2,
 		typename X3, typename Y3, typename Z3>
 		typename X3, typename Y3, typename Z3>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat
 	(
 	(
 		X1 x1, Y1 y1, Z1 z1,
 		X1 x1, Y1 y1, Z1 z1,
 		X2 x2, Y2 y2, Z2 z2,
 		X2 x2, Y2 y2, Z2 z2,
@@ -97,7 +97,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2, typename V3>
 	template <typename V1, typename V2, typename V3>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat
 	(
 	(
 		vec<3, V1, P> const& v1,
 		vec<3, V1, P> const& v1,
 		vec<3, V2, P> const& v2,
 		vec<3, V2, P> const& v2,
@@ -113,7 +113,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, U, Q> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -121,7 +121,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -129,7 +129,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -137,7 +137,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -145,7 +145,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -153,7 +153,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -161,7 +161,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -169,7 +169,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -177,7 +177,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -187,14 +187,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type & mat<3, 3, T, P>::operator[](typename mat<3, 3, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type const & mat<3, 3, T, P>::operator[](typename mat<3, 3, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -204,7 +204,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator=(mat<3, 3, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -215,7 +215,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator=(mat<3, 3, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -225,7 +225,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -235,7 +235,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+=(tmat3x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator+=(mat<3, 3, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -245,7 +245,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -255,7 +255,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-=(tmat3x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator-=(mat<3, 3, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -265,7 +265,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -275,14 +275,14 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*=(tmat3x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator*=(mat<3, 3, U, P> const & m)
 	{
 	{
 		return (*this = *this * m);
 		return (*this = *this * m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -292,7 +292,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/=(tmat3x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator/=(mat<3, 3, U, P> const & m)
 	{
 	{
 		return *this *= inverse(m);
 		return *this *= inverse(m);
 	}
 	}
@@ -300,7 +300,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -309,7 +309,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -318,17 +318,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat<3, 3, T, P>::operator++(int)
 	{
 	{
-		tmat3x3<T, P> Result(*this);
+		mat<3, 3, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat<3, 3, T, P>::operator--(int)
 	{
 	{
-		tmat3x3<T, P> Result(*this);
+		mat<3, 3, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -336,15 +336,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			-m[0], 
 			-m[0], 
 			-m[1],
 			-m[1],
 			-m[2]);
 			-m[2]);
@@ -353,97 +353,97 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar,
 			m[1] + scalar,
 			m[2] + scalar);
 			m[2] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(T scalar, tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(T scalar, mat<3, 3, T, P> const & m)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar,
 			m[1] + scalar,
 			m[2] + scalar);
 			m[2] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1],
 			m1[1] + m2[1],
 			m1[2] + m2[2]);
 			m1[2] + m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m[0] - scalar,
 			m[0] - scalar,
 			m[1] - scalar,
 			m[1] - scalar,
 			m[2] - scalar);
 			m[2] - scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(T scalar, tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(T scalar, mat<3, 3, T, P> const & m)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			scalar - m[0],
 			scalar - m[0],
 			scalar - m[1],
 			scalar - m[1],
 			scalar - m[2]);
 			scalar - m[2]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1],
 			m1[1] - m2[1],
 			m1[2] - m2[2]);
 			m1[2] - m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar);
 			m[2] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(T scalar, tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(T scalar, mat<3, 3, T, P> const & m)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar);
 			m[2] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator*(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v)
+	GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type operator*(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v)
 	{
 	{
-		return typename tmat3x3<T, P>::col_type(
+		return typename mat<3, 3, T, P>::col_type(
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,
 			m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z);
 			m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator*(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::row_type operator*(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m)
 	{
 	{
-		return typename tmat3x3<T, P>::row_type(
+		return typename mat<3, 3, T, P>::row_type(
 			m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z,
 			m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z,
 			m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z,
 			m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z,
 			m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z);
 			m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
 		T const SrcA00 = m1[0][0];
 		T const SrcA00 = m1[0][0];
 		T const SrcA01 = m1[0][1];
 		T const SrcA01 = m1[0][1];
@@ -465,7 +465,7 @@ namespace glm
 		T const SrcB21 = m2[2][1];
 		T const SrcB21 = m2[2][1];
 		T const SrcB22 = m2[2][2];
 		T const SrcB22 = m2[2][2];
 
 
-		tmat3x3<T, P> Result(uninitialize);
+		mat<3, 3, T, P> Result(uninitialize);
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;
@@ -479,9 +479,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
@@ -491,9 +491,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
@@ -509,52 +509,52 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(tmat3x3<T, P> const & m,	T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m,	T scalar)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			m[0] / scalar,
 			m[0] / scalar,
 			m[1] / scalar,
 			m[1] / scalar,
 			m[2] / scalar);
 			m[2] / scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(T scalar, tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(T scalar, mat<3, 3, T, P> const & m)
 	{
 	{
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			scalar / m[0],
 			scalar / m[0],
 			scalar / m[1],
 			scalar / m[1],
 			scalar / m[2]);
 			scalar / m[2]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v)
+	GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type operator/(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v)
 	{
 	{
 		return  inverse(m) * v;
 		return  inverse(m) * v;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator/(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::row_type operator/(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m)
 	{
 	{
 		return v * inverse(m);
 		return v * inverse(m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
-		tmat3x3<T, P> m1_copy(m1);
+		mat<3, 3, T, P> m1_copy(m1);
 		return m1_copy /= m2;
 		return m1_copy /= m2;
 	}
 	}
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
 	}
 	}

+ 51 - 51
glm/detail/type_mat3x4.hpp

@@ -12,13 +12,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat3x4
+	template <typename T, precision P>
+	struct mat<3, 4, T, P>
 	{
 	{
 		typedef vec<4, T, P> col_type;
 		typedef vec<4, T, P> col_type;
 		typedef vec<3, T, P> row_type;
 		typedef vec<3, T, P> row_type;
-		typedef tmat3x4<T, P> type;
-		typedef tmat4x3<T, P> transpose_type;
+		typedef mat<3, 4, T, P> type;
+		typedef mat<4, 3, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -27,18 +27,18 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat3x4() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<3, 4, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<3, 4, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat3x4(ctor);
-		GLM_FUNC_DECL explicit tmat3x4(T scalar);
-		GLM_FUNC_DECL tmat3x4(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T scalar);
+		GLM_FUNC_DECL mat(
 			T x0, T y0, T z0, T w0,
 			T x0, T y0, T z0, T w0,
 			T x1, T y1, T z1, T w1,
 			T x1, T y1, T z1, T w1,
 			T x2, T y2, T z2, T w2);
 			T x2, T y2, T z2, T w2);
-		GLM_FUNC_DECL tmat3x4(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1,
 			col_type const & v1,
 			col_type const & v2);
 			col_type const & v2);
@@ -49,13 +49,13 @@ namespace glm
 			typename X1, typename Y1, typename Z1, typename W1,
 			typename X1, typename Y1, typename Z1, typename W1,
 			typename X2, typename Y2, typename Z2, typename W2,
 			typename X2, typename Y2, typename Z2, typename W2,
 			typename X3, typename Y3, typename Z3, typename W3>
 			typename X3, typename Y3, typename Z3, typename W3>
-		GLM_FUNC_DECL tmat3x4(
+		GLM_FUNC_DECL mat(
 			X1 x1, Y1 y1, Z1 z1, W1 w1,
 			X1 x1, Y1 y1, Z1 z1, W1 w1,
 			X2 x2, Y2 y2, Z2 z2, W2 w2,
 			X2 x2, Y2 y2, Z2 z2, W2 w2,
 			X3 x3, Y3 y3, Z3 z3, W3 w3);
 			X3 x3, Y3 y3, Z3 z3, W3 w3);
 
 
 		template <typename V1, typename V2, typename V3>
 		template <typename V1, typename V2, typename V3>
-		GLM_FUNC_DECL tmat3x4(
+		GLM_FUNC_DECL mat(
 			vec<4, V1, P> const & v1,
 			vec<4, V1, P> const & v1,
 			vec<4, V2, P> const & v2,
 			vec<4, V2, P> const & v2,
 			vec<4, V3, P> const & v3);
 			vec<4, V3, P> const & v3);
@@ -63,16 +63,16 @@ namespace glm
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x4<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x3<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -84,87 +84,87 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator=(mat<3, 4, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator=(mat<3, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x4<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x4<T, P> & operator+=(tmat3x4<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator+=(mat<3, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x4<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x4<T, P> & operator-=(tmat3x4<U, P> const & m);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator-=(mat<3, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x4<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat3x4<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator/=(U s);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat3x4<T, P> & operator++();
-		GLM_FUNC_DECL tmat3x4<T, P> & operator--();
-		GLM_FUNC_DECL tmat3x4<T, P> operator++(int);
-		GLM_FUNC_DECL tmat3x4<T, P> operator--(int);
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator++();
+		GLM_FUNC_DECL mat<3, 4, T, P> & operator--();
+		GLM_FUNC_DECL mat<3, 4, T, P> operator++(int);
+		GLM_FUNC_DECL mat<3, 4, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator*(T scalar, tmat3x4<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator*(T scalar, mat<3, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator*(tmat3x4<T, P> const & m, typename tmat3x4<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<3, 4, T, P>::col_type operator*(mat<3, 4, T, P> const & m, typename mat<3, 4, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat3x4<T, P>::row_type operator*(typename tmat3x4<T, P>::col_type const & v, tmat3x4<T, P> const & m);
+	GLM_FUNC_DECL typename mat<3, 4, T, P>::row_type operator*(typename mat<3, 4, T, P>::col_type const & v, mat<3, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat3x4<T, P> const & m1,	tmat4x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<3, 4, T, P> const & m1,	mat<4, 3, T, P> const& m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat2x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<2, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m1,	tmat3x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m1,	mat<3, 3, T, P> const& m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator/(tmat3x4<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator/(mat<3, 4, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator/(T scalar, tmat3x4<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator/(T scalar, mat<3, 4, T, P> const & m);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
 }//namespace glm
 }//namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 69 - 69
glm/detail/type_mat3x4.inl

@@ -7,7 +7,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()
+		GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0, 0, 0);
 				this->value[0] = col_type(1, 0, 0, 0);
@@ -19,7 +19,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, T, P> const & m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -29,7 +29,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, T, Q> const & m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
@@ -37,11 +37,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat3x4<T, P>::tmat3x4(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 4, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(T scalar)
 	{
 	{
 		this->value[0] = col_type(scalar, 0, 0, 0);
 		this->value[0] = col_type(scalar, 0, 0, 0);
 		this->value[1] = col_type(0, scalar, 0, 0);
 		this->value[1] = col_type(0, scalar, 0, 0);
@@ -49,7 +49,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat 
 	(
 	(
 		T x0, T y0, T z0, T w0,
 		T x0, T y0, T z0, T w0,
 		T x1, T y1, T z1, T w1,
 		T x1, T y1, T z1, T w1,
@@ -62,7 +62,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat 
 	(
 	(
 		col_type const & v0,
 		col_type const & v0,
 		col_type const & v1,
 		col_type const & v1,
@@ -81,7 +81,7 @@ namespace glm
 		typename X1, typename Y1, typename Z1, typename W1,
 		typename X1, typename Y1, typename Z1, typename W1,
 		typename X2, typename Y2, typename Z2, typename W2,
 		typename X2, typename Y2, typename Z2, typename W2,
 		typename X3, typename Y3, typename Z3, typename W3>
 		typename X3, typename Y3, typename Z3, typename W3>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat 
 	(
 	(
 		X1 x1, Y1 y1, Z1 z1, W1 w1,
 		X1 x1, Y1 y1, Z1 z1, W1 w1,
 		X2 x2, Y2 y2, Z2 z2, W2 w2,
 		X2 x2, Y2 y2, Z2 z2, W2 w2,
@@ -95,7 +95,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2, typename V3>
 	template <typename V1, typename V2, typename V3>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat 
 	(
 	(
 		vec<4, V1, P> const & v1,
 		vec<4, V1, P> const & v1,
 		vec<4, V2, P> const & v2,
 		vec<4, V2, P> const & v2,
@@ -111,7 +111,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, U, Q> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -119,7 +119,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
@@ -127,7 +127,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -135,7 +135,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -143,7 +143,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -151,7 +151,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
@@ -159,7 +159,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -167,7 +167,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
@@ -175,7 +175,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -185,14 +185,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type & mat<3, 4, T, P>::operator[](typename mat<3, 4, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type const & mat<3, 4, T, P>::operator[](typename mat<3, 4, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -202,7 +202,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator=(mat<3, 4, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -213,7 +213,7 @@ namespace glm
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
 	template <typename U> 
 	template <typename U> 
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator=(mat<3, 4, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -223,7 +223,7 @@ namespace glm
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
 	template <typename U> 
 	template <typename U> 
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -233,7 +233,7 @@ namespace glm
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
 	template <typename U> 
 	template <typename U> 
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+=(tmat3x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator+=(mat<3, 4, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -243,7 +243,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -253,7 +253,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-=(tmat3x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator-=(mat<3, 4, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -263,7 +263,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -273,7 +273,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> & tmat3x4<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> & mat<3, 4, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -284,7 +284,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -293,7 +293,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -302,17 +302,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat<3, 4, T, P>::operator++(int)
 	{
 	{
-		tmat3x4<T, P> Result(*this);
+		mat<3, 4, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat<3, 4, T, P>::operator--(int)
 	{
 	{
-		tmat3x4<T, P> Result(*this);
+		mat<3, 4, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -320,15 +320,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			-m[0],
 			-m[0],
 			-m[1],
 			-m[1],
 			-m[2]);
 			-m[2]);
@@ -337,67 +337,67 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar,
 			m[1] + scalar,
 			m[2] + scalar);
 			m[2] + scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1],
 			m1[1] + m2[1],
 			m1[2] + m2[2]);
 			m1[2] + m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-(tmat3x4<T, P> const & m,	T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m,	T scalar)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m[0] - scalar,
 			m[0] - scalar,
 			m[1] - scalar,
 			m[1] - scalar,
 			m[2] - scalar);
 			m[2] - scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1],
 			m1[1] - m2[1],
 			m1[2] - m2[2]);
 			m1[2] - m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m, T scalar)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar);
 			m[2] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(T scalar, tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(T scalar, mat<3, 4, T, P> const & m)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar);
 			m[2] * scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type operator*
+	GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type operator*
 	(
 	(
-		tmat3x4<T, P> const & m,
-		typename tmat3x4<T, P>::row_type const & v
+		mat<3, 4, T, P> const& m,
+		typename mat<3, 4, T, P>::row_type const & v
 	)
 	)
 	{
 	{
-		return typename tmat3x4<T, P>::col_type(
+		return typename mat<3, 4, T, P>::col_type(
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,
 			m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z,
 			m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z,
@@ -405,20 +405,20 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::row_type operator*
+	GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::row_type operator*
 	(
 	(
-		typename tmat3x4<T, P>::col_type const & v,
-		tmat3x4<T, P> const & m
+		typename mat<3, 4, T, P>::col_type const & v,
+		mat<3, 4, T, P> const& m
 	)
 	)
 	{
 	{
-		return typename tmat3x4<T, P>::row_type(
+		return typename mat<3, 4, T, P>::row_type(
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3],
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3],
 			v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]);
 			v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat4x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<4, 3, T, P> const & m2)
 	{
 	{
 		const T SrcA00 = m1[0][0];
 		const T SrcA00 = m1[0][0];
 		const T SrcA01 = m1[0][1];
 		const T SrcA01 = m1[0][1];
@@ -446,7 +446,7 @@ namespace glm
 		const T SrcB31 = m2[3][1];
 		const T SrcB31 = m2[3][1];
 		const T SrcB32 = m2[3][2];
 		const T SrcB32 = m2[3][2];
 
 
-		tmat4x4<T, P> Result(uninitialize);
+		mat<4, 4, T, P> Result(uninitialize);
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;
@@ -467,9 +467,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat2x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<2, 3, T, P> const & m2)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
@@ -481,9 +481,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat3x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<3, 3, T, P> const & m2)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
@@ -499,18 +499,18 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(tmat3x4<T, P> const & m,	T scalar)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator/(mat<3, 4, T, P> const & m,	T scalar)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m[0] / scalar,
 			m[0] / scalar,
 			m[1] / scalar,
 			m[1] / scalar,
 			m[2] / scalar);
 			m[2] / scalar);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(T scalar, tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator/(T scalar, mat<3, 4, T, P> const & m)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			scalar / m[0],
 			scalar / m[0],
 			scalar / m[1],
 			scalar / m[1],
 			scalar / m[2]);
 			scalar / m[2]);
@@ -519,13 +519,13 @@ namespace glm
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
 	}
 	}

+ 51 - 51
glm/detail/type_mat4x2.hpp

@@ -12,13 +12,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat4x2
+	template <typename T, precision P>
+	struct mat<4, 2, T, P>
 	{
 	{
 		typedef vec<2, T, P> col_type;
 		typedef vec<2, T, P> col_type;
 		typedef vec<4, T, P> row_type;
 		typedef vec<4, T, P> row_type;
-		typedef tmat4x2<T, P> type;
-		typedef tmat2x4<T, P> transpose_type;
+		typedef mat<4, 2, T, P> type;
+		typedef mat<2, 4, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -27,19 +27,19 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat4x2() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<4, 2, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<4, 2, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat4x2(ctor);
-		GLM_FUNC_DECL explicit tmat4x2(T scalar);
-		GLM_FUNC_DECL tmat4x2(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T scalar);
+		GLM_FUNC_DECL mat(
 			T x0, T y0,
 			T x0, T y0,
 			T x1, T y1,
 			T x1, T y1,
 			T x2, T y2,
 			T x2, T y2,
 			T x3, T y3);
 			T x3, T y3);
-		GLM_FUNC_DECL tmat4x2(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1,
 			col_type const & v1,
 			col_type const & v2,
 			col_type const & v2,
@@ -52,14 +52,14 @@ namespace glm
 			typename X2, typename Y2,
 			typename X2, typename Y2,
 			typename X3, typename Y3,
 			typename X3, typename Y3,
 			typename X4, typename Y4>
 			typename X4, typename Y4>
-		GLM_FUNC_DECL tmat4x2(
+		GLM_FUNC_DECL mat(
 			X1 x1, Y1 y1,
 			X1 x1, Y1 y1,
 			X2 x2, Y2 y2,
 			X2 x2, Y2 y2,
 			X3 x3, Y3 y3,
 			X3 x3, Y3 y3,
 			X4 x4, Y4 y4);
 			X4 x4, Y4 y4);
 
 
 		template <typename V1, typename V2, typename V3, typename V4>
 		template <typename V1, typename V2, typename V3, typename V4>
-		GLM_FUNC_DECL tmat4x2(
+		GLM_FUNC_DECL mat(
 			vec<2, V1, P> const & v1,
 			vec<2, V1, P> const & v1,
 			vec<2, V2, P> const & v2,
 			vec<2, V2, P> const & v2,
 			vec<2, V3, P> const & v3,
 			vec<2, V3, P> const & v3,
@@ -68,16 +68,16 @@ namespace glm
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x2<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x4<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -89,87 +89,87 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x2<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x2<T, P> & operator+=(tmat4x2<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator+=(mat<4, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x2<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x2<T, P> & operator-=(tmat4x2<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator-=(mat<4, 2, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x2<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x2<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator/=(U s);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat4x2<T, P> & operator++ ();
-		GLM_FUNC_DECL tmat4x2<T, P> & operator-- ();
-		GLM_FUNC_DECL tmat4x2<T, P> operator++(int);
-		GLM_FUNC_DECL tmat4x2<T, P> operator--(int);
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator++ ();
+		GLM_FUNC_DECL mat<4, 2, T, P> & operator-- ();
+		GLM_FUNC_DECL mat<4, 2, T, P> operator++(int);
+		GLM_FUNC_DECL mat<4, 2, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m1,	tmat4x2<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m1,	mat<4, 2, T, P> const& m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator*(T scalar, tmat4x2<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator*(T scalar, mat<4, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x2<T, P>::col_type operator*(tmat4x2<T, P> const & m, typename tmat4x2<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<4, 2, T, P>::col_type operator*(mat<4, 2, T, P> const & m, typename mat<4, 2, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x2<T, P>::row_type operator*(typename tmat4x2<T, P>::col_type const & v, tmat4x2<T, P> const & m);
+	GLM_FUNC_DECL typename mat<4, 2, T, P>::row_type operator*(typename mat<4, 2, T, P>::col_type const & v, mat<4, 2, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat2x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<2, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat3x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<3, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<4, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T scalar);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator/(mat<4, 2, T, P> const & m, T scalar);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> operator/(T scalar, tmat4x2<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 2, T, P> operator/(T scalar, mat<4, 2, T, P> const & m);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
 }//namespace glm
 }//namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 65 - 65
glm/detail/type_mat4x2.inl

@@ -7,7 +7,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P> 
 		template <typename T, precision P> 
-		GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()
+		GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0);
 				this->value[0] = col_type(1, 0);
@@ -20,7 +20,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, T, P> const & m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -31,7 +31,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, T, Q> const & m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
@@ -40,11 +40,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat4x2<T, P>::tmat4x2(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<4, 2, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(T scalar)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(T scalar)
 	{
 	{
 		this->value[0] = col_type(scalar, 0);
 		this->value[0] = col_type(scalar, 0);
 		this->value[1] = col_type(0, scalar);
 		this->value[1] = col_type(0, scalar);
@@ -53,7 +53,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat
 	(
 	(
 		T x0, T y0,
 		T x0, T y0,
 		T x1, T y1,
 		T x1, T y1,
@@ -68,7 +68,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat
 	(
 	(
 		col_type const & v0,
 		col_type const & v0,
 		col_type const & v1,
 		col_type const & v1,
@@ -90,7 +90,7 @@ namespace glm
 		typename X2, typename Y2,
 		typename X2, typename Y2,
 		typename X3, typename Y3,
 		typename X3, typename Y3,
 		typename X4, typename Y4>
 		typename X4, typename Y4>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat
 	(
 	(
 		X1 x1, Y1 y1,
 		X1 x1, Y1 y1,
 		X2 x2, Y2 y2,
 		X2 x2, Y2 y2,
@@ -106,7 +106,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2, typename V3, typename V4>
 	template <typename V1, typename V2, typename V3, typename V4>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat
 	(
 	(
 		vec<2, V1, P> const & v1,
 		vec<2, V1, P> const & v1,
 		vec<2, V2, P> const & v2,
 		vec<2, V2, P> const & v2,
@@ -124,7 +124,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, U, Q> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -133,7 +133,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -142,7 +142,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -151,7 +151,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -160,7 +160,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -169,7 +169,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -178,7 +178,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -187,7 +187,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -196,7 +196,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -207,14 +207,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type & mat<4, 2, T, P>::operator[](typename mat<4, 2, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type const & mat<4, 2, T, P>::operator[](typename mat<4, 2, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -224,7 +224,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<4, 2, T, P>& mat<4, 2, T, P>::operator=(mat<4, 2, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -236,7 +236,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P>& mat<4, 2, T, P>::operator=(mat<4, 2, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -247,7 +247,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -258,7 +258,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+=(tmat4x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator+=(mat<4, 2, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -269,7 +269,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -280,7 +280,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-=(tmat4x2<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator-=(mat<4, 2, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -291,7 +291,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -302,7 +302,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -314,7 +314,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -324,7 +324,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -334,17 +334,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> mat<4, 2, T, P>::operator++(int)
 	{
 	{
-		tmat4x2<T, P> Result(*this);
+		mat<4, 2, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> mat<4, 2, T, P>::operator--(int)
 	{
 	{
-		tmat4x2<T, P> Result(*this);
+		mat<4, 2, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -352,15 +352,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			-m[0],
 			-m[0],
 			-m[1],
 			-m[1],
 			-m[2],
 			-m[2],
@@ -370,9 +370,9 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m[0] + scalar,
 			m[0] + scalar,
 			m[1] + scalar,
 			m[1] + scalar,
 			m[2] + scalar,
 			m[2] + scalar,
@@ -380,9 +380,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1],
 			m1[1] + m2[1],
 			m1[2] + m2[2],
 			m1[2] + m2[2],
@@ -390,9 +390,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m[0] - scalar,
 			m[0] - scalar,
 			m[1] - scalar,
 			m[1] - scalar,
 			m[2] - scalar,
 			m[2] - scalar,
@@ -400,9 +400,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1],
 			m1[1] - m2[1],
 			m1[2] - m2[2],
 			m1[2] - m2[2],
@@ -410,9 +410,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar,
 			m[2] * scalar,
@@ -420,9 +420,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(T scalar, tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(T scalar, mat<4, 2, T, P> const & m)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m[0] * scalar,
 			m[0] * scalar,
 			m[1] * scalar,
 			m[1] * scalar,
 			m[2] * scalar,
 			m[2] * scalar,
@@ -430,17 +430,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type operator*(tmat4x2<T, P> const & m, typename tmat4x2<T, P>::row_type const & v)
+	GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type operator*(mat<4, 2, T, P> const & m, typename mat<4, 2, T, P>::row_type const & v)
 	{
 	{
-		return typename tmat4x2<T, P>::col_type(
+		return typename mat<4, 2, T, P>::col_type(
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w);
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::row_type operator*(typename tmat4x2<T, P>::col_type const & v, tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::row_type operator*(typename mat<4, 2, T, P>::col_type const & v, mat<4, 2, T, P> const & m)
 	{
 	{
-		return typename tmat4x2<T, P>::row_type(
+		return typename mat<4, 2, T, P>::row_type(
 			v.x * m[0][0] + v.y * m[0][1],
 			v.x * m[0][0] + v.y * m[0][1],
 			v.x * m[1][0] + v.y * m[1][1],
 			v.x * m[1][0] + v.y * m[1][1],
 			v.x * m[2][0] + v.y * m[2][1],
 			v.x * m[2][0] + v.y * m[2][1],
@@ -448,7 +448,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat2x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<2, 4, T, P> const & m2)
 	{
 	{
 		T const SrcA00 = m1[0][0];
 		T const SrcA00 = m1[0][0];
 		T const SrcA01 = m1[0][1];
 		T const SrcA01 = m1[0][1];
@@ -468,7 +468,7 @@ namespace glm
 		T const SrcB12 = m2[1][2];
 		T const SrcB12 = m2[1][2];
 		T const SrcB13 = m2[1][3];
 		T const SrcB13 = m2[1][3];
 
 
-		tmat2x2<T, P> Result(uninitialize);
+		mat<2, 2, T, P> Result(uninitialize);
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
 		Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;
 		Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;
@@ -477,9 +477,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat3x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<3, 4, T, P> const & m2)
 	{
 	{
-		return tmat3x2<T, P>(
+		return mat<3, 2, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
@@ -489,9 +489,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
 			m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
@@ -503,9 +503,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T scalar)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator/(mat<4, 2, T, P> const & m, T scalar)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			m[0] / scalar,
 			m[0] / scalar,
 			m[1] / scalar,
 			m[1] / scalar,
 			m[2] / scalar,
 			m[2] / scalar,
@@ -513,9 +513,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(T scalar, tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator/(T scalar, mat<4, 2, T, P> const & m)
 	{
 	{
-		return tmat4x2<T, P>(
+		return mat<4, 2, T, P>(
 			scalar / m[0],
 			scalar / m[0],
 			scalar / m[1],
 			scalar / m[1],
 			scalar / m[2],
 			scalar / m[2],
@@ -525,13 +525,13 @@ namespace glm
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
 	}
 	}

+ 51 - 51
glm/detail/type_mat4x3.hpp

@@ -12,13 +12,13 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat4x3
+	template <typename T, precision P>
+	struct mat<4, 3, T, P>
 	{
 	{
 		typedef vec<3, T, P> col_type;
 		typedef vec<3, T, P> col_type;
 		typedef vec<4, T, P> row_type;
 		typedef vec<4, T, P> row_type;
-		typedef tmat4x3<T, P> type;
-		typedef tmat3x4<T, P> transpose_type;
+		typedef mat<4, 3, T, P> type;
+		typedef mat<3, 4, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
@@ -27,19 +27,19 @@ namespace glm
 	public:
 	public:
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat4x3() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<4, 3, T, P> const & m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<4, 3, T, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat4x3(ctor);
-		GLM_FUNC_DECL explicit tmat4x3(T const & x);
-		GLM_FUNC_DECL tmat4x3(
+		GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T const & x);
+		GLM_FUNC_DECL mat(
 			T const & x0, T const & y0, T const & z0,
 			T const & x0, T const & y0, T const & z0,
 			T const & x1, T const & y1, T const & z1,
 			T const & x1, T const & y1, T const & z1,
 			T const & x2, T const & y2, T const & z2,
 			T const & x2, T const & y2, T const & z2,
 			T const & x3, T const & y3, T const & z3);
 			T const & x3, T const & y3, T const & z3);
-		GLM_FUNC_DECL tmat4x3(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1,
 			col_type const & v1,
 			col_type const & v2,
 			col_type const & v2,
@@ -52,14 +52,14 @@ namespace glm
 			typename X2, typename Y2, typename Z2,
 			typename X2, typename Y2, typename Z2,
 			typename X3, typename Y3, typename Z3,
 			typename X3, typename Y3, typename Z3,
 			typename X4, typename Y4, typename Z4>
 			typename X4, typename Y4, typename Z4>
-		GLM_FUNC_DECL tmat4x3(
+		GLM_FUNC_DECL mat(
 			X1 const & x1, Y1 const & y1, Z1 const & z1,
 			X1 const & x1, Y1 const & y1, Z1 const & z1,
 			X2 const & x2, Y2 const & y2, Z2 const & z2,
 			X2 const & x2, Y2 const & y2, Z2 const & z2,
 			X3 const & x3, Y3 const & y3, Z3 const & z3,
 			X3 const & x3, Y3 const & y3, Z3 const & z3,
 			X4 const & x4, Y4 const & y4, Z4 const & z4);
 			X4 const & x4, Y4 const & y4, Z4 const & z4);
 
 
 		template <typename V1, typename V2, typename V3, typename V4>
 		template <typename V1, typename V2, typename V3, typename V4>
-		GLM_FUNC_DECL tmat4x3(
+		GLM_FUNC_DECL mat(
 			vec<3, V1, P> const & v1,
 			vec<3, V1, P> const & v1,
 			vec<3, V2, P> const & v2,
 			vec<3, V2, P> const & v2,
 			vec<3, V3, P> const & v3,
 			vec<3, V3, P> const & v3,
@@ -68,16 +68,16 @@ namespace glm
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x3<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x4<T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
 
 
 		// -- Accesses --
 		// -- Accesses --
 
 
@@ -89,87 +89,87 @@ namespace glm
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator=(mat<4, 3, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator=(mat<4, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x3<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x3<T, P> & operator+=(tmat4x3<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator+=(mat<4, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x3<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x3<T, P> & operator-=(tmat4x3<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator-=(mat<4, 3, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x3<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x3<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<4, 3, T, P> & operator/=(U s);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat4x3<T, P> & operator++();
-		GLM_FUNC_DECL tmat4x3<T, P> & operator--();
-		GLM_FUNC_DECL tmat4x3<T, P> operator++(int);
-		GLM_FUNC_DECL tmat4x3<T, P> operator--(int);
+		GLM_FUNC_DECL mat<4, 3, T, P>& operator++();
+		GLM_FUNC_DECL mat<4, 3, T, P>& operator--();
+		GLM_FUNC_DECL mat<4, 3, T, P> operator++(int);
+		GLM_FUNC_DECL mat<4, 3, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator*(T const & s, tmat4x3<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator*(T const & s, mat<4, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator*(tmat4x3<T, P> const & m, typename tmat4x3<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<4, 3, T, P>::col_type operator*(mat<4, 3, T, P> const & m, typename mat<4, 3, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator*(typename tmat4x3<T, P>::col_type const & v, tmat4x3<T, P> const & m);
+	GLM_FUNC_DECL typename mat<4, 3, T, P>::row_type operator*(typename mat<4, 3, T, P>::col_type const & v, mat<4, 3, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<2, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat4x3<T, P> const & m1,	tmat3x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<4, 3, T, P> const & m1,	mat<3, 4, T, P> const& m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<4, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator/(tmat4x3<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator/(mat<4, 3, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> operator/(T const & s, tmat4x3<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 3, T, P> operator/(T const & s, mat<4, 3, T, P> const & m);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
 }//namespace glm
 }//namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 69 - 69
glm/detail/type_mat4x3.inl

@@ -7,7 +7,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()
+		GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0, 0);
 				this->value[0] = col_type(1, 0, 0);
@@ -20,7 +20,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, T, P> const & m)
 		{
 		{
 			this->value[0] = m.value[0];
 			this->value[0] = m.value[0];
 			this->value[1] = m.value[1];
 			this->value[1] = m.value[1];
@@ -31,7 +31,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, T, Q> const & m)
 	{
 	{
 		this->value[0] = m.value[0];
 		this->value[0] = m.value[0];
 		this->value[1] = m.value[1];
 		this->value[1] = m.value[1];
@@ -40,11 +40,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat4x3<T, P>::tmat4x3(ctor)
+	GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<4, 3, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(T const & s)
 	{
 	{
 		this->value[0] = col_type(s, 0, 0);
 		this->value[0] = col_type(s, 0, 0);
 		this->value[1] = col_type(0, s, 0);
 		this->value[1] = col_type(0, s, 0);
@@ -53,7 +53,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat
 	(
 	(
 		T const & x0, T const & y0, T const & z0,
 		T const & x0, T const & y0, T const & z0,
 		T const & x1, T const & y1, T const & z1,
 		T const & x1, T const & y1, T const & z1,
@@ -68,7 +68,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat
 	(
 	(
 		col_type const & v0,
 		col_type const & v0,
 		col_type const & v1,
 		col_type const & v1,
@@ -90,7 +90,7 @@ namespace glm
 		typename X2, typename Y2, typename Z2,
 		typename X2, typename Y2, typename Z2,
 		typename X3, typename Y3, typename Z3,
 		typename X3, typename Y3, typename Z3,
 		typename X4, typename Y4, typename Z4>
 		typename X4, typename Y4, typename Z4>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat
 	(
 	(
 		X1 const & x1, Y1 const & y1, Z1 const & z1,
 		X1 const & x1, Y1 const & y1, Z1 const & z1,
 		X2 const & x2, Y2 const & y2, Z2 const & z2,
 		X2 const & x2, Y2 const & y2, Z2 const & z2,
@@ -106,7 +106,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2, typename V3, typename V4>
 	template <typename V1, typename V2, typename V3, typename V4>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat
 	(
 	(
 		vec<3, V1, P> const & v1,
 		vec<3, V1, P> const & v1,
 		vec<3, V2, P> const & v2,
 		vec<3, V2, P> const & v2,
@@ -124,7 +124,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<U, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, U, Q> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -133,7 +133,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -142,7 +142,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -151,7 +151,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -160,7 +160,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -169,7 +169,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -178,7 +178,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -187,7 +187,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -196,7 +196,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
 		this->value[1] = col_type(m[1]);
 		this->value[1] = col_type(m[1]);
@@ -207,14 +207,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type & mat<4, 3, T, P>::operator[](typename mat<4, 3, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type const & mat<4, 3, T, P>::operator[](typename mat<4, 3, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -224,7 +224,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<4, 3, T, P>& mat<4, 3, T, P>::operator=(mat<4, 3, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -236,7 +236,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P>& mat<4, 3, T, P>::operator=(mat<4, 3, U, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -247,7 +247,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -258,7 +258,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+=(tmat4x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator+=(mat<4, 3, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -269,7 +269,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -280,7 +280,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-=(tmat4x3<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator-=(mat<4, 3, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -291,7 +291,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -302,7 +302,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -314,7 +314,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -324,7 +324,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -334,17 +334,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> mat<4, 3, T, P>::operator++(int)
 	{
 	{
-		tmat4x3<T, P> Result(*this);
+		mat<4, 3, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> mat<4, 3, T, P>::operator--(int)
 	{
 	{
-		tmat4x3<T, P> Result(*this);
+		mat<4, 3, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -352,15 +352,15 @@ namespace glm
 	// -- Unary arithmetic operators --
 	// -- Unary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator+(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator-(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			-m[0],
 			-m[0],
 			-m[1],
 			-m[1],
 			-m[2],
 			-m[2],
@@ -370,9 +370,9 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m, T const & s)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m[0] + s,
 			m[0] + s,
 			m[1] + s,
 			m[1] + s,
 			m[2] + s,
 			m[2] + s,
@@ -380,9 +380,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator+(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1],
 			m1[1] + m2[1],
 			m1[2] + m2[2],
 			m1[2] + m2[2],
@@ -390,9 +390,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator-(tmat4x3<T, P> const & m, T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m, T const & s)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m[0] - s,
 			m[0] - s,
 			m[1] - s,
 			m[1] - s,
 			m[2] - s,
 			m[2] - s,
@@ -400,9 +400,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator-(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1],
 			m1[1] - m2[1],
 			m1[2] - m2[2],
 			m1[2] - m2[2],
@@ -410,9 +410,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat4x3<T, P> const & m, T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m, T const & s)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m[0] * s,
 			m[0] * s,
 			m[1] * s,
 			m[1] * s,
 			m[2] * s,
 			m[2] * s,
@@ -420,9 +420,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(T const & s, tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(T const & s, mat<4, 3, T, P> const & m)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m[0] * s,
 			m[0] * s,
 			m[1] * s,
 			m[1] * s,
 			m[2] * s,
 			m[2] * s,
@@ -430,24 +430,24 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type operator*
+	GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type operator*
 	(
 	(
-		tmat4x3<T, P> const & m,
-		typename tmat4x3<T, P>::row_type const & v)
+		mat<4, 3, T, P> const& m,
+		typename mat<4, 3, T, P>::row_type const & v)
 	{
 	{
-		return typename tmat4x3<T, P>::col_type(
+		return typename mat<4, 3, T, P>::col_type(
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
 			m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w,
 			m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w,
 			m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w);
 			m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::row_type operator*
+	GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::row_type operator*
 	(
 	(
-		typename tmat4x3<T, P>::col_type const & v,
-		tmat4x3<T, P> const & m)
+		typename mat<4, 3, T, P>::col_type const & v,
+		mat<4, 3, T, P> const& m)
 	{
 	{
-		return typename tmat4x3<T, P>::row_type(
+		return typename mat<4, 3, T, P>::row_type(
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],
 			v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2],
 			v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2],
 			v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2],
 			v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2],
@@ -455,9 +455,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<2, 4, T, P> const & m2)
 	{
 	{
-		return tmat2x3<T, P>(
+		return mat<2, 3, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
@@ -467,7 +467,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat3x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<3, 4, T, P> const & m2)
 	{
 	{
 		T const SrcA00 = m1[0][0];
 		T const SrcA00 = m1[0][0];
 		T const SrcA01 = m1[0][1];
 		T const SrcA01 = m1[0][1];
@@ -495,7 +495,7 @@ namespace glm
 		T const SrcB22 = m2[2][2];
 		T const SrcB22 = m2[2][2];
 		T const SrcB23 = m2[2][3];
 		T const SrcB23 = m2[2][3];
 
 
-		tmat3x3<T, P> Result(uninitialize);
+		mat<3, 3, T, P> Result(uninitialize);
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
 		Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
 		Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03;
 		Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03;
@@ -509,9 +509,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
@@ -527,9 +527,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator/(tmat4x3<T, P> const & m, T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator/(mat<4, 3, T, P> const & m, T const & s)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			m[0] / s,
 			m[0] / s,
 			m[1] / s,
 			m[1] / s,
 			m[2] / s,
 			m[2] / s,
@@ -537,9 +537,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> operator/(T const & s, tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator/(T const & s, mat<4, 3, T, P> const & m)
 	{
 	{
-		return tmat4x3<T, P>(
+		return mat<4, 3, T, P>(
 			s / m[0],
 			s / m[0],
 			s / m[1],
 			s / m[1],
 			s / m[2],
 			s / m[2],
@@ -549,13 +549,13 @@ namespace glm
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
 	}
 	}

+ 66 - 66
glm/detail/type_mat4x4.hpp

@@ -11,34 +11,42 @@
 
 
 namespace glm
 namespace glm
 {
 {
-	template <typename T, precision P = defaultp>
-	struct tmat4x4
+	template <typename T, precision P>
+	struct mat<4, 4, T, P>
 	{
 	{
 		typedef vec<4, T, P> col_type;
 		typedef vec<4, T, P> col_type;
 		typedef vec<4, T, P> row_type;
 		typedef vec<4, T, P> row_type;
-		typedef tmat4x4<T, P> type;
-		typedef tmat4x4<T, P> transpose_type;
+		typedef mat<4, 4, T, P> type;
+		typedef mat<4, 4, T, P> transpose_type;
 		typedef T value_type;
 		typedef T value_type;
 
 
 	private:
 	private:
 		col_type value[4];
 		col_type value[4];
 
 
 	public:
 	public:
+		// -- Accesses --
+
+		typedef length_t length_type;
+		GLM_FUNC_DECL static length_type length(){return 4;}
+
+		GLM_FUNC_DECL col_type & operator[](length_type i);
+		GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+
 		// -- Constructors --
 		// -- Constructors --
 
 
-		GLM_FUNC_DECL tmat4x4() GLM_DEFAULT_CTOR;
-		GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat() GLM_DEFAULT_CTOR;
+		GLM_FUNC_DECL mat(mat<4, 4, T, P> const& m) GLM_DEFAULT;
 		template <precision Q>
 		template <precision Q>
-		GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
+		GLM_FUNC_DECL mat(mat<4, 4, T, Q> const& m);
 
 
-		GLM_FUNC_DECL explicit tmat4x4(ctor);
-		GLM_FUNC_DECL explicit tmat4x4(T const & x);
-		GLM_FUNC_DECL tmat4x4(
+		GLM_FUNC_DECL explicit mat(ctor);
+		GLM_FUNC_DECL explicit mat(T const & x);
+		GLM_FUNC_DECL mat(
 			T const & x0, T const & y0, T const & z0, T const & w0,
 			T const & x0, T const & y0, T const & z0, T const & w0,
 			T const & x1, T const & y1, T const & z1, T const & w1,
 			T const & x1, T const & y1, T const & z1, T const & w1,
 			T const & x2, T const & y2, T const & z2, T const & w2,
 			T const & x2, T const & y2, T const & z2, T const & w2,
 			T const & x3, T const & y3, T const & z3, T const & w3);
 			T const & x3, T const & y3, T const & z3, T const & w3);
-		GLM_FUNC_DECL tmat4x4(
+		GLM_FUNC_DECL mat(
 			col_type const & v0,
 			col_type const & v0,
 			col_type const & v1,
 			col_type const & v1,
 			col_type const & v2,
 			col_type const & v2,
@@ -51,14 +59,14 @@ namespace glm
 			typename X2, typename Y2, typename Z2, typename W2,
 			typename X2, typename Y2, typename Z2, typename W2,
 			typename X3, typename Y3, typename Z3, typename W3,
 			typename X3, typename Y3, typename Z3, typename W3,
 			typename X4, typename Y4, typename Z4, typename W4>
 			typename X4, typename Y4, typename Z4, typename W4>
-		GLM_FUNC_DECL tmat4x4(
+		GLM_FUNC_DECL mat(
 			X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
 			X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
 			X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
 			X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
 			X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
 			X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
 			X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
 			X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
 
 
 		template <typename V1, typename V2, typename V3, typename V4>
 		template <typename V1, typename V2, typename V3, typename V4>
-		GLM_FUNC_DECL tmat4x4(
+		GLM_FUNC_DECL mat(
 			vec<4, V1, P> const & v1,
 			vec<4, V1, P> const & v1,
 			vec<4, V2, P> const & v2,
 			vec<4, V2, P> const & v2,
 			vec<4, V3, P> const & v3,
 			vec<4, V3, P> const & v3,
@@ -67,127 +75,119 @@ namespace glm
 		// -- Matrix conversions --
 		// -- Matrix conversions --
 
 
 		template <typename U, precision Q>
 		template <typename U, precision Q>
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x4<U, Q> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, U, Q> const & m);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x3<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x2<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x4<T, P> const & x);
-		GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x3<T, P> const & x);
-
-		// -- Accesses --
-
-		typedef length_t length_type;
-		GLM_FUNC_DECL static length_type length(){return 4;}
-
-		GLM_FUNC_DECL col_type & operator[](length_type i);
-		GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x);
+		GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x);
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
-		GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m) GLM_DEFAULT;
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator=(mat<4, 4, T, P> const & m) GLM_DEFAULT;
 
 
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator=(mat<4, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator+=(U s);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator+=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator+=(tmat4x4<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator+=(mat<4, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator-=(U s);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator-=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator-=(tmat4x4<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator-=(mat<4, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator*=(U s);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator*=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator*=(tmat4x4<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator*=(mat<4, 4, U, P> const & m);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator/=(U s);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator/=(U s);
 		template <typename U>
 		template <typename U>
-		GLM_FUNC_DECL tmat4x4<T, P> & operator/=(tmat4x4<U, P> const & m);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator/=(mat<4, 4, U, P> const & m);
 
 
 		// -- Increment and decrement operators --
 		// -- Increment and decrement operators --
 
 
-		GLM_FUNC_DECL tmat4x4<T, P> & operator++();
-		GLM_FUNC_DECL tmat4x4<T, P> & operator--();
-		GLM_FUNC_DECL tmat4x4<T, P> operator++(int);
-		GLM_FUNC_DECL tmat4x4<T, P> operator--(int);
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator++();
+		GLM_FUNC_DECL mat<4, 4, T, P> & operator--();
+		GLM_FUNC_DECL mat<4, 4, T, P> operator++(int);
+		GLM_FUNC_DECL mat<4, 4, T, P> operator--(int);
 	};
 	};
 
 
 	// -- Unary operators --
 	// -- Unary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator+(tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator-(tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m);
 
 
 	// -- Binary operators --
 	// -- Binary operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator+(tmat4x4<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator+(T const & s, tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator+(T const & s, mat<4, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator+(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator-(tmat4x4<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator-(T const & s, tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator-(T const & s, mat<4, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator-(tmat4x4<T, P> const & m1,	tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m1,	mat<4, 4, T, P> const& m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat4x4<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator*(T const & s, tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator*(T const & s, mat<4, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator*(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<4, 4, T, P>::col_type operator*(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator*(typename tmat4x4<T, P>::col_type const & v, tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL typename mat<4, 4, T, P>::row_type operator*(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator/(tmat4x4<T, P> const & m, T const & s);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m, T const & s);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator/(T const & s, tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator/(T const & s, mat<4, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator/(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v);
+	GLM_FUNC_DECL typename mat<4, 4, T, P>::col_type operator/(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/(typename tmat4x4<T, P>::col_type const & v, tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL typename mat<4, 4, T, P>::row_type operator/(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> operator/(tmat4x4<T, P> const & m1,	tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m1,	mat<4, 4, T, P> const& m2);
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator==(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL bool operator==(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL bool operator!=(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+	GLM_FUNC_DECL bool operator!=(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
 }//namespace glm
 }//namespace glm
 
 
 #ifndef GLM_EXTERNAL_TEMPLATE
 #ifndef GLM_EXTERNAL_TEMPLATE

+ 100 - 100
glm/detail/type_mat4x4.inl

@@ -9,7 +9,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()
+		GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat()
 		{
 		{
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 #			ifndef GLM_FORCE_NO_CTOR_INIT 
 				this->value[0] = col_type(1, 0, 0, 0);
 				this->value[0] = col_type(1, 0, 0, 0);
@@ -22,7 +22,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 4, T, P> const & m)
 		{
 		{
 			this->value[0] = m[0];
 			this->value[0] = m[0];
 			this->value[1] = m[1];
 			this->value[1] = m[1];
@@ -33,7 +33,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <precision Q>
 	template <precision Q>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, Q> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 4, T, Q> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -42,11 +42,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(ctor)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(ctor)
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(T const & s)
 	{
 	{
 		this->value[0] = col_type(s, 0, 0, 0);
 		this->value[0] = col_type(s, 0, 0, 0);
 		this->value[1] = col_type(0, s, 0, 0);
 		this->value[1] = col_type(0, s, 0, 0);
@@ -55,7 +55,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
 	(
 	(
 		T const & x0, T const & y0, T const & z0, T const & w0,
 		T const & x0, T const & y0, T const & z0, T const & w0,
 		T const & x1, T const & y1, T const & z1, T const & w1,
 		T const & x1, T const & y1, T const & z1, T const & w1,
@@ -70,7 +70,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
 	(
 	(
 		col_type const & v0,
 		col_type const & v0,
 		col_type const & v1,
 		col_type const & v1,
@@ -86,9 +86,9 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U, precision Q>
 	template <typename U, precision Q>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
 	(
 	(
-		tmat4x4<U, Q> const & m
+		mat<4, 4, U, Q> const & m
 	)
 	)
 	{
 	{
 		this->value[0] = col_type(m[0]);
 		this->value[0] = col_type(m[0]);
@@ -105,7 +105,7 @@ namespace glm
 		typename X2, typename Y2, typename Z2, typename W2,
 		typename X2, typename Y2, typename Z2, typename W2,
 		typename X3, typename Y3, typename Z3, typename W3,
 		typename X3, typename Y3, typename Z3, typename W3,
 		typename X4, typename Y4, typename Z4, typename W4>
 		typename X4, typename Y4, typename Z4, typename W4>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
 	(
 	(
 		X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
 		X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
 		X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
 		X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
@@ -141,7 +141,7 @@ namespace glm
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename V1, typename V2, typename V3, typename V4>
 	template <typename V1, typename V2, typename V3, typename V4>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
 	(
 	(
 		vec<4, V1, P> const & v1,
 		vec<4, V1, P> const & v1,
 		vec<4, V2, P> const & v2,
 		vec<4, V2, P> const & v2,
@@ -163,7 +163,7 @@ namespace glm
 	// -- Matrix conversions --
 	// -- Matrix conversions --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
@@ -172,7 +172,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -181,7 +181,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -190,7 +190,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat3x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
@@ -199,7 +199,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -208,7 +208,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 2, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[0] = col_type(m[0], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
 		this->value[1] = col_type(m[1], 0, 0);
@@ -217,7 +217,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 4, T, P> const & m)
 	{
 	{
 		this->value[0] = m[0];
 		this->value[0] = m[0];
 		this->value[1] = m[1];
 		this->value[1] = m[1];
@@ -226,7 +226,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 3, T, P> const & m)
 	{
 	{
 		this->value[0] = col_type(m[0], 0);
 		this->value[0] = col_type(m[0], 0);
 		this->value[1] = col_type(m[1], 0);
 		this->value[1] = col_type(m[1], 0);
@@ -237,14 +237,14 @@ namespace glm
 	// -- Accesses --
 	// -- Accesses --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i)
+	GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type & mat<4, 4, T, P>::operator[](typename mat<4, 4, T, P>::length_type i)
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i) const
+	GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type const & mat<4, 4, T, P>::operator[](typename mat<4, 4, T, P>::length_type i) const
 	{
 	{
 		assert(i < this->length());
 		assert(i < this->length());
 		return this->value[i];
 		return this->value[i];
@@ -254,7 +254,7 @@ namespace glm
 
 
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 #	if !GLM_HAS_DEFAULTED_FUNCTIONS
 		template <typename T, precision P>
 		template <typename T, precision P>
-		GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<T, P> const & m)
+		GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator=(mat<4, 4, T, P> const & m)
 		{
 		{
 			//memcpy could be faster
 			//memcpy could be faster
 			//memcpy(&this->value, &m.value, 16 * sizeof(valType));
 			//memcpy(&this->value, &m.value, 16 * sizeof(valType));
@@ -268,7 +268,7 @@ namespace glm
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
 	template <typename U> 
 	template <typename U> 
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator=(mat<4, 4, U, P> const & m)
 	{
 	{
 		//memcpy could be faster
 		//memcpy could be faster
 		//memcpy(&this->value, &m.value, 16 * sizeof(valType));
 		//memcpy(&this->value, &m.value, 16 * sizeof(valType));
@@ -281,7 +281,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator+=(U s)
 	{
 	{
 		this->value[0] += s;
 		this->value[0] += s;
 		this->value[1] += s;
 		this->value[1] += s;
@@ -292,7 +292,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+=(tmat4x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator+=(mat<4, 4, U, P> const & m)
 	{
 	{
 		this->value[0] += m[0];
 		this->value[0] += m[0];
 		this->value[1] += m[1];
 		this->value[1] += m[1];
@@ -303,7 +303,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator-=(U s)
 	{
 	{
 		this->value[0] -= s;
 		this->value[0] -= s;
 		this->value[1] -= s;
 		this->value[1] -= s;
@@ -314,7 +314,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-=(tmat4x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator-=(mat<4, 4, U, P> const & m)
 	{
 	{
 		this->value[0] -= m[0];
 		this->value[0] -= m[0];
 		this->value[1] -= m[1];
 		this->value[1] -= m[1];
@@ -325,7 +325,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator*=(U s)
 	{
 	{
 		this->value[0] *= s;
 		this->value[0] *= s;
 		this->value[1] *= s;
 		this->value[1] *= s;
@@ -336,14 +336,14 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*=(tmat4x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator*=(mat<4, 4, U, P> const & m)
 	{
 	{
 		return (*this = *this * m);
 		return (*this = *this * m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/=(U s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator/=(U s)
 	{
 	{
 		this->value[0] /= s;
 		this->value[0] /= s;
 		this->value[1] /= s;
 		this->value[1] /= s;
@@ -354,7 +354,7 @@ namespace glm
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
 	template <typename U>
 	template <typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/=(tmat4x4<U, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator/=(mat<4, 4, U, P> const & m)
 	{
 	{
 		return *this *= inverse(m);
 		return *this *= inverse(m);
 	}
 	}
@@ -362,7 +362,7 @@ namespace glm
 	// -- Increment and decrement operators --
 	// -- Increment and decrement operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator++()
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator++()
 	{
 	{
 		++this->value[0];
 		++this->value[0];
 		++this->value[1];
 		++this->value[1];
@@ -372,7 +372,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator--()
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator--()
 	{
 	{
 		--this->value[0];
 		--this->value[0];
 		--this->value[1];
 		--this->value[1];
@@ -382,17 +382,17 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator++(int)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat<4, 4, T, P>::operator++(int)
 	{
 	{
-		tmat4x4<T, P> Result(*this);
+		mat<4, 4, T, P> Result(*this);
 		++*this;
 		++*this;
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator--(int)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat<4, 4, T, P>::operator--(int)
 	{
 	{
-		tmat4x4<T, P> Result(*this);
+		mat<4, 4, T, P> Result(*this);
 		--*this;
 		--*this;
 		return Result;
 		return Result;
 	}
 	}
@@ -400,15 +400,15 @@ namespace glm
 	// -- Unary constant operators --
 	// -- Unary constant operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m)
 	{
 	{
 		return m;
 		return m;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			-m[0],
 			-m[0],
 			-m[1],
 			-m[1],
 			-m[2],
 			-m[2],
@@ -418,9 +418,9 @@ namespace glm
 	// -- Binary arithmetic operators --
 	// -- Binary arithmetic operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(tmat4x4<T, P> const & m, T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m, T const & s)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m[0] + s,
 			m[0] + s,
 			m[1] + s,
 			m[1] + s,
 			m[2] + s,
 			m[2] + s,
@@ -428,9 +428,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(T const & s, tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(T const & s, mat<4, 4, T, P> const & m)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m[0] + s,
 			m[0] + s,
 			m[1] + s,
 			m[1] + s,
 			m[2] + s,
 			m[2] + s,
@@ -438,9 +438,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m1[0] + m2[0],
 			m1[0] + m2[0],
 			m1[1] + m2[1],
 			m1[1] + m2[1],
 			m1[2] + m2[2],
 			m1[2] + m2[2],
@@ -448,9 +448,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-(tmat4x4<T, P> const & m, T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m, T const & s)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m[0] - s,
 			m[0] - s,
 			m[1] - s,
 			m[1] - s,
 			m[2] - s,
 			m[2] - s,
@@ -458,9 +458,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-(T const & s, tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(T const & s, mat<4, 4, T, P> const & m)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			s - m[0],
 			s - m[0],
 			s - m[1],
 			s - m[1],
 			s - m[2],
 			s - m[2],
@@ -468,9 +468,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m1[0] - m2[0],
 			m1[0] - m2[0],
 			m1[1] - m2[1],
 			m1[1] - m2[1],
 			m1[2] - m2[2],
 			m1[2] - m2[2],
@@ -478,9 +478,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat4x4<T, P> const & m, T const  & s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m, T const  & s)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m[0] * s,
 			m[0] * s,
 			m[1] * s,
 			m[1] * s,
 			m[2] * s,
 			m[2] * s,
@@ -488,9 +488,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(T const & s, tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(T const & s, mat<4, 4, T, P> const & m)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m[0] * s,
 			m[0] * s,
 			m[1] * s,
 			m[1] * s,
 			m[2] * s,
 			m[2] * s,
@@ -498,10 +498,10 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator*
+	GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type operator*
 	(
 	(
-		tmat4x4<T, P> const & m,
-		typename tmat4x4<T, P>::row_type const & v
+		mat<4, 4, T, P> const& m,
+		typename mat<4, 4, T, P>::row_type const & v
 	)
 	)
 	{
 	{
 /*
 /*
@@ -520,24 +520,24 @@ namespace glm
 
 
 		__m128 a2 = _mm_add_ps(a0, a1);
 		__m128 a2 = _mm_add_ps(a0, a1);
 
 
-		return typename tmat4x4<T, P>::col_type(a2);
+		return typename mat<4, 4, T, P>::col_type(a2);
 */
 */
 
 
-		typename tmat4x4<T, P>::col_type const Mov0(v[0]);
-		typename tmat4x4<T, P>::col_type const Mov1(v[1]);
-		typename tmat4x4<T, P>::col_type const Mul0 = m[0] * Mov0;
-		typename tmat4x4<T, P>::col_type const Mul1 = m[1] * Mov1;
-		typename tmat4x4<T, P>::col_type const Add0 = Mul0 + Mul1;
-		typename tmat4x4<T, P>::col_type const Mov2(v[2]);
-		typename tmat4x4<T, P>::col_type const Mov3(v[3]);
-		typename tmat4x4<T, P>::col_type const Mul2 = m[2] * Mov2;
-		typename tmat4x4<T, P>::col_type const Mul3 = m[3] * Mov3;
-		typename tmat4x4<T, P>::col_type const Add1 = Mul2 + Mul3;
-		typename tmat4x4<T, P>::col_type const Add2 = Add0 + Add1;
+		typename mat<4, 4, T, P>::col_type const Mov0(v[0]);
+		typename mat<4, 4, T, P>::col_type const Mov1(v[1]);
+		typename mat<4, 4, T, P>::col_type const Mul0 = m[0] * Mov0;
+		typename mat<4, 4, T, P>::col_type const Mul1 = m[1] * Mov1;
+		typename mat<4, 4, T, P>::col_type const Add0 = Mul0 + Mul1;
+		typename mat<4, 4, T, P>::col_type const Mov2(v[2]);
+		typename mat<4, 4, T, P>::col_type const Mov3(v[3]);
+		typename mat<4, 4, T, P>::col_type const Mul2 = m[2] * Mov2;
+		typename mat<4, 4, T, P>::col_type const Mul3 = m[3] * Mov3;
+		typename mat<4, 4, T, P>::col_type const Add1 = Mul2 + Mul3;
+		typename mat<4, 4, T, P>::col_type const Add2 = Add0 + Add1;
 		return Add2;
 		return Add2;
 
 
 /*
 /*
-		return typename tmat4x4<T, P>::col_type(
+		return typename mat<4, 4, T, P>::col_type(
 			m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0] * v[3],
 			m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0] * v[3],
 			m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1] * v[3],
 			m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1] * v[3],
 			m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2] * v[3],
 			m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2] * v[3],
@@ -546,13 +546,13 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator*
+	GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::row_type operator*
 	(
 	(
-		typename tmat4x4<T, P>::col_type const & v,
-		tmat4x4<T, P> const & m
+		typename mat<4, 4, T, P>::col_type const & v,
+		mat<4, 4, T, P> const& m
 	)
 	)
 	{
 	{
-		return typename tmat4x4<T, P>::row_type(
+		return typename mat<4, 4, T, P>::row_type(
 			m[0][0] * v[0] + m[0][1] * v[1] + m[0][2] * v[2] + m[0][3] * v[3],
 			m[0][0] * v[0] + m[0][1] * v[1] + m[0][2] * v[2] + m[0][3] * v[3],
 			m[1][0] * v[0] + m[1][1] * v[1] + m[1][2] * v[2] + m[1][3] * v[3],
 			m[1][0] * v[0] + m[1][1] * v[1] + m[1][2] * v[2] + m[1][3] * v[3],
 			m[2][0] * v[0] + m[2][1] * v[1] + m[2][2] * v[2] + m[2][3] * v[3],
 			m[2][0] * v[0] + m[2][1] * v[1] + m[2][2] * v[2] + m[2][3] * v[3],
@@ -560,9 +560,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
 	{
 	{
-		return tmat2x4<T, P>(
+		return mat<2, 4, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
@@ -574,9 +574,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
 	{
 	{
-		return tmat3x4<T, P>(
+		return mat<3, 4, T, P>(
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
 			m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
@@ -592,19 +592,19 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
-		typename tmat4x4<T, P>::col_type const SrcA0 = m1[0];
-		typename tmat4x4<T, P>::col_type const SrcA1 = m1[1];
-		typename tmat4x4<T, P>::col_type const SrcA2 = m1[2];
-		typename tmat4x4<T, P>::col_type const SrcA3 = m1[3];
+		typename mat<4, 4, T, P>::col_type const SrcA0 = m1[0];
+		typename mat<4, 4, T, P>::col_type const SrcA1 = m1[1];
+		typename mat<4, 4, T, P>::col_type const SrcA2 = m1[2];
+		typename mat<4, 4, T, P>::col_type const SrcA3 = m1[3];
 
 
-		typename tmat4x4<T, P>::col_type const SrcB0 = m2[0];
-		typename tmat4x4<T, P>::col_type const SrcB1 = m2[1];
-		typename tmat4x4<T, P>::col_type const SrcB2 = m2[2];
-		typename tmat4x4<T, P>::col_type const SrcB3 = m2[3];
+		typename mat<4, 4, T, P>::col_type const SrcB0 = m2[0];
+		typename mat<4, 4, T, P>::col_type const SrcB1 = m2[1];
+		typename mat<4, 4, T, P>::col_type const SrcB2 = m2[2];
+		typename mat<4, 4, T, P>::col_type const SrcB3 = m2[3];
 
 
-		tmat4x4<T, P> Result(uninitialize);
+		mat<4, 4, T, P> Result(uninitialize);
 		Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3];
 		Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3];
 		Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3];
 		Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3];
 		Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3];
 		Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3];
@@ -613,9 +613,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/(tmat4x4<T, P> const & m, T const & s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m, T const & s)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			m[0] / s,
 			m[0] / s,
 			m[1] / s,
 			m[1] / s,
 			m[2] / s,
 			m[2] / s,
@@ -623,9 +623,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/(T const & s,	tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(T const & s,	mat<4, 4, T, P> const& m)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			s / m[0],
 			s / m[0],
 			s / m[1],
 			s / m[1],
 			s / m[2],
 			s / m[2],
@@ -633,34 +633,34 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator/(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v)
+	GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type operator/(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v)
 	{
 	{
 		return inverse(m) * v;
 		return inverse(m) * v;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator/(typename tmat4x4<T, P>::col_type const & v, tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::row_type operator/(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m)
 	{
 	{
 		return v * inverse(m);
 		return v * inverse(m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
-		tmat4x4<T, P> m1_copy(m1);
+		mat<4, 4, T, P> m1_copy(m1);
 		return m1_copy /= m2;
 		return m1_copy /= m2;
 	}
 	}
 
 
 	// -- Boolean operators --
 	// -- Boolean operators --
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator==(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator==(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
 		return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool operator!=(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+	GLM_FUNC_QUALIFIER bool operator!=(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
 	{
 	{
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
 		return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
 	}
 	}

+ 0 - 2
glm/detail/type_vec.hpp

@@ -101,8 +101,6 @@ namespace detail
 #	endif
 #	endif
 }//namespace detail
 }//namespace detail
 
 
-	template <int S, typename T, precision P = defaultp> struct vec;
-
 	typedef vec<1, float, highp>		highp_vec1_t;
 	typedef vec<1, float, highp>		highp_vec1_t;
 	typedef vec<1, float, mediump>	mediump_vec1_t;
 	typedef vec<1, float, mediump>	mediump_vec1_t;
 	typedef vec<1, float, lowp>		lowp_vec1_t;
 	typedef vec<1, float, lowp>		lowp_vec1_t;

+ 81 - 81
glm/fwd.hpp

@@ -1716,39 +1716,39 @@ namespace glm
 
 
 	/// Low single-precision floating-point 2x2 matrix.
 	/// Low single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, lowp> lowp_fmat2x2;
+	typedef mat<2, 2, f32, lowp> lowp_fmat2x2;
 
 
 	/// Low single-precision floating-point 2x3 matrix.
 	/// Low single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, lowp> lowp_fmat2x3;
+	typedef mat<2, 3, f32, lowp> lowp_fmat2x3;
 
 
 	/// Low single-precision floating-point 2x4 matrix.
 	/// Low single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, lowp> lowp_fmat2x4;
+	typedef mat<2, 4, f32, lowp> lowp_fmat2x4;
 
 
 	/// Low single-precision floating-point 3x2 matrix.
 	/// Low single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, lowp> lowp_fmat3x2;
+	typedef mat<3, 2, f32, lowp> lowp_fmat3x2;
 
 
 	/// Low single-precision floating-point 3x3 matrix.
 	/// Low single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, lowp> lowp_fmat3x3;
+	typedef mat<3, 3, f32, lowp> lowp_fmat3x3;
 
 
 	/// Low single-precision floating-point 3x4 matrix.
 	/// Low single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, lowp> lowp_fmat3x4;
+	typedef mat<3, 4, f32, lowp> lowp_fmat3x4;
 
 
 	/// Low single-precision floating-point 4x2 matrix.
 	/// Low single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, lowp> lowp_fmat4x2;
+	typedef mat<4, 2, f32, lowp> lowp_fmat4x2;
 
 
 	/// Low single-precision floating-point 4x3 matrix.
 	/// Low single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, lowp> lowp_fmat4x3;
+	typedef mat<4, 3, f32, lowp> lowp_fmat4x3;
 
 
 	/// Low single-precision floating-point 4x4 matrix.
 	/// Low single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, lowp> lowp_fmat4x4;
+	typedef mat<4, 4, f32, lowp> lowp_fmat4x4;
 
 
 	/// Low single-precision floating-point 1x1 matrix.
 	/// Low single-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -1773,39 +1773,39 @@ namespace glm
 
 
 	/// Medium single-precision floating-point 2x2 matrix.
 	/// Medium single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, mediump> mediump_fmat2x2;
+	typedef mat<2, 2, f32, mediump> mediump_fmat2x2;
 
 
 	/// Medium single-precision floating-point 2x3 matrix.
 	/// Medium single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, mediump> mediump_fmat2x3;
+	typedef mat<2, 3, f32, mediump> mediump_fmat2x3;
 
 
 	/// Medium single-precision floating-point 2x4 matrix.
 	/// Medium single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, mediump> mediump_fmat2x4;
+	typedef mat<2, 4, f32, mediump> mediump_fmat2x4;
 
 
 	/// Medium single-precision floating-point 3x2 matrix.
 	/// Medium single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, mediump> mediump_fmat3x2;
+	typedef mat<3, 2, f32, mediump> mediump_fmat3x2;
 
 
 	/// Medium single-precision floating-point 3x3 matrix.
 	/// Medium single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, mediump> mediump_fmat3x3;
+	typedef mat<3, 3, f32, mediump> mediump_fmat3x3;
 
 
 	/// Medium single-precision floating-point 3x4 matrix.
 	/// Medium single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, mediump> mediump_fmat3x4;
+	typedef mat<3, 4, f32, mediump> mediump_fmat3x4;
 
 
 	/// Medium single-precision floating-point 4x2 matrix.
 	/// Medium single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, mediump> mediump_fmat4x2;
+	typedef mat<4, 2, f32, mediump> mediump_fmat4x2;
 
 
 	/// Medium single-precision floating-point 4x3 matrix.
 	/// Medium single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, mediump> mediump_fmat4x3;
+	typedef mat<4, 3, f32, mediump> mediump_fmat4x3;
 
 
 	/// Medium single-precision floating-point 4x4 matrix.
 	/// Medium single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, mediump> mediump_fmat4x4;
+	typedef mat<4, 4, f32, mediump> mediump_fmat4x4;
 
 
 	/// Medium single-precision floating-point 1x1 matrix.
 	/// Medium single-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -1830,39 +1830,39 @@ namespace glm
 
 
 	/// High single-precision floating-point 2x2 matrix.
 	/// High single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, highp> highp_fmat2x2;
+	typedef mat<2, 2, f32, highp> highp_fmat2x2;
 
 
 	/// High single-precision floating-point 2x3 matrix.
 	/// High single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, highp> highp_fmat2x3;
+	typedef mat<2, 3, f32, highp> highp_fmat2x3;
 
 
 	/// High single-precision floating-point 2x4 matrix.
 	/// High single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, highp> highp_fmat2x4;
+	typedef mat<2, 4, f32, highp> highp_fmat2x4;
 
 
 	/// High single-precision floating-point 3x2 matrix.
 	/// High single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, highp> highp_fmat3x2;
+	typedef mat<3, 2, f32, highp> highp_fmat3x2;
 
 
 	/// High single-precision floating-point 3x3 matrix.
 	/// High single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, highp> highp_fmat3x3;
+	typedef mat<3, 3, f32, highp> highp_fmat3x3;
 
 
 	/// High single-precision floating-point 3x4 matrix.
 	/// High single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, highp> highp_fmat3x4;
+	typedef mat<3, 4, f32, highp> highp_fmat3x4;
 
 
 	/// High single-precision floating-point 4x2 matrix.
 	/// High single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, highp> highp_fmat4x2;
+	typedef mat<4, 2, f32, highp> highp_fmat4x2;
 
 
 	/// High single-precision floating-point 4x3 matrix.
 	/// High single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, highp> highp_fmat4x3;
+	typedef mat<4, 3, f32, highp> highp_fmat4x3;
 
 
 	/// High single-precision floating-point 4x4 matrix.
 	/// High single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, highp> highp_fmat4x4;
+	typedef mat<4, 4, f32, highp> highp_fmat4x4;
 
 
 	/// High single-precision floating-point 1x1 matrix.
 	/// High single-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -1887,39 +1887,39 @@ namespace glm
 
 
 	/// Low single-precision floating-point 2x2 matrix.
 	/// Low single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, lowp> lowp_f32mat2x2;
+	typedef mat<2, 2, f32, lowp> lowp_f32mat2x2;
 
 
 	/// Low single-precision floating-point 2x3 matrix.
 	/// Low single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, lowp> lowp_f32mat2x3;
+	typedef mat<2, 3, f32, lowp> lowp_f32mat2x3;
 
 
 	/// Low single-precision floating-point 2x4 matrix.
 	/// Low single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, lowp> lowp_f32mat2x4;
+	typedef mat<2, 4, f32, lowp> lowp_f32mat2x4;
 
 
 	/// Low single-precision floating-point 3x2 matrix.
 	/// Low single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, lowp> lowp_f32mat3x2;
+	typedef mat<3, 2, f32, lowp> lowp_f32mat3x2;
 
 
 	/// Low single-precision floating-point 3x3 matrix.
 	/// Low single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, lowp> lowp_f32mat3x3;
+	typedef mat<3, 3, f32, lowp> lowp_f32mat3x3;
 
 
 	/// Low single-precision floating-point 3x4 matrix.
 	/// Low single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, lowp> lowp_f32mat3x4;
+	typedef mat<3, 4, f32, lowp> lowp_f32mat3x4;
 
 
 	/// Low single-precision floating-point 4x2 matrix.
 	/// Low single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, lowp> lowp_f32mat4x2;
+	typedef mat<4, 2, f32, lowp> lowp_f32mat4x2;
 
 
 	/// Low single-precision floating-point 4x3 matrix.
 	/// Low single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, lowp> lowp_f32mat4x3;
+	typedef mat<4, 3, f32, lowp> lowp_f32mat4x3;
 
 
 	/// Low single-precision floating-point 4x4 matrix.
 	/// Low single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, lowp> lowp_f32mat4x4;
+	typedef mat<4, 4, f32, lowp> lowp_f32mat4x4;
 
 
 	/// Low single-precision floating-point 1x1 matrix.
 	/// Low single-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -1944,39 +1944,39 @@ namespace glm
 
 
 	/// Low single-precision floating-point 2x2 matrix.
 	/// Low single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, mediump> mediump_f32mat2x2;
+	typedef mat<2, 2, f32, mediump> mediump_f32mat2x2;
 
 
 	/// Medium single-precision floating-point 2x3 matrix.
 	/// Medium single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, mediump> mediump_f32mat2x3;
+	typedef mat<2, 3, f32, mediump> mediump_f32mat2x3;
 
 
 	/// Medium single-precision floating-point 2x4 matrix.
 	/// Medium single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, mediump> mediump_f32mat2x4;
+	typedef mat<2, 4, f32, mediump> mediump_f32mat2x4;
 
 
 	/// Medium single-precision floating-point 3x2 matrix.
 	/// Medium single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, mediump> mediump_f32mat3x2;
+	typedef mat<3, 2, f32, mediump> mediump_f32mat3x2;
 
 
 	/// Medium single-precision floating-point 3x3 matrix.
 	/// Medium single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, mediump> mediump_f32mat3x3;
+	typedef mat<3, 3, f32, mediump> mediump_f32mat3x3;
 
 
 	/// Medium single-precision floating-point 3x4 matrix.
 	/// Medium single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, mediump> mediump_f32mat3x4;
+	typedef mat<3, 4, f32, mediump> mediump_f32mat3x4;
 
 
 	/// Medium single-precision floating-point 4x2 matrix.
 	/// Medium single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, mediump> mediump_f32mat4x2;
+	typedef mat<4, 2, f32, mediump> mediump_f32mat4x2;
 
 
 	/// Medium single-precision floating-point 4x3 matrix.
 	/// Medium single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, mediump> mediump_f32mat4x3;
+	typedef mat<4, 3, f32, mediump> mediump_f32mat4x3;
 
 
 	/// Medium single-precision floating-point 4x4 matrix.
 	/// Medium single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, mediump> mediump_f32mat4x4;
+	typedef mat<4, 4, f32, mediump> mediump_f32mat4x4;
 
 
 	/// Medium single-precision floating-point 1x1 matrix.
 	/// Medium single-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -2001,39 +2001,39 @@ namespace glm
 
 
 	/// High single-precision floating-point 2x2 matrix.
 	/// High single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, highp> highp_f32mat2x2;
+	typedef mat<2, 2, f32, highp> highp_f32mat2x2;
 
 
 	/// High single-precision floating-point 2x3 matrix.
 	/// High single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, highp> highp_f32mat2x3;
+	typedef mat<2, 3, f32, highp> highp_f32mat2x3;
 
 
 	/// High single-precision floating-point 2x4 matrix.
 	/// High single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, highp> highp_f32mat2x4;
+	typedef mat<2, 4, f32, highp> highp_f32mat2x4;
 
 
 	/// High single-precision floating-point 3x2 matrix.
 	/// High single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, highp> highp_f32mat3x2;
+	typedef mat<3, 2, f32, highp> highp_f32mat3x2;
 
 
 	/// High single-precision floating-point 3x3 matrix.
 	/// High single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, highp> highp_f32mat3x3;
+	typedef mat<3, 3, f32, highp> highp_f32mat3x3;
 
 
 	/// High single-precision floating-point 3x4 matrix.
 	/// High single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, highp> highp_f32mat3x4;
+	typedef mat<3, 4, f32, highp> highp_f32mat3x4;
 
 
 	/// High single-precision floating-point 4x2 matrix.
 	/// High single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, highp> highp_f32mat4x2;
+	typedef mat<4, 2, f32, highp> highp_f32mat4x2;
 
 
 	/// High single-precision floating-point 4x3 matrix.
 	/// High single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, highp> highp_f32mat4x3;
+	typedef mat<4, 3, f32, highp> highp_f32mat4x3;
 
 
 	/// High single-precision floating-point 4x4 matrix.
 	/// High single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, highp> highp_f32mat4x4;
+	typedef mat<4, 4, f32, highp> highp_f32mat4x4;
 
 
 	/// High single-precision floating-point 1x1 matrix.
 	/// High single-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -2058,39 +2058,39 @@ namespace glm
 
 
 	/// Low double-precision floating-point 2x2 matrix.
 	/// Low double-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f64, lowp> lowp_f64mat2x2;
+	typedef mat<2, 2, f64, lowp> lowp_f64mat2x2;
 
 
 	/// Low double-precision floating-point 2x3 matrix.
 	/// Low double-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f64, lowp> lowp_f64mat2x3;
+	typedef mat<2, 3, f64, lowp> lowp_f64mat2x3;
 
 
 	/// Low double-precision floating-point 2x4 matrix.
 	/// Low double-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f64, lowp> lowp_f64mat2x4;
+	typedef mat<2, 4, f64, lowp> lowp_f64mat2x4;
 
 
 	/// Low double-precision floating-point 3x2 matrix.
 	/// Low double-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f64, lowp> lowp_f64mat3x2;
+	typedef mat<3, 2, f64, lowp> lowp_f64mat3x2;
 
 
 	/// Low double-precision floating-point 3x3 matrix.
 	/// Low double-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f64, lowp> lowp_f64mat3x3;
+	typedef mat<3, 3, f64, lowp> lowp_f64mat3x3;
 
 
 	/// Low double-precision floating-point 3x4 matrix.
 	/// Low double-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f64, lowp> lowp_f64mat3x4;
+	typedef mat<3, 4, f64, lowp> lowp_f64mat3x4;
 
 
 	/// Low double-precision floating-point 4x2 matrix.
 	/// Low double-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f64, lowp> lowp_f64mat4x2;
+	typedef mat<4, 2, f64, lowp> lowp_f64mat4x2;
 
 
 	/// Low double-precision floating-point 4x3 matrix.
 	/// Low double-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f64, lowp> lowp_f64mat4x3;
+	typedef mat<4, 3, f64, lowp> lowp_f64mat4x3;
 	
 	
 	/// Low double-precision floating-point 4x4 matrix.
 	/// Low double-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f64, lowp> lowp_f64mat4x4;
+	typedef mat<4, 4, f64, lowp> lowp_f64mat4x4;
 
 
 	/// Low double-precision floating-point 1x1 matrix.
 	/// Low double-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -2115,39 +2115,39 @@ namespace glm
 
 
 	/// Medium double-precision floating-point 2x2 matrix.
 	/// Medium double-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f64, mediump> mediump_f64mat2x2;
+	typedef mat<2, 2, f64, mediump> mediump_f64mat2x2;
 
 
 	/// Medium double-precision floating-point 2x3 matrix.
 	/// Medium double-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f64, mediump> mediump_f64mat2x3;
+	typedef mat<2, 3, f64, mediump> mediump_f64mat2x3;
 
 
 	/// Medium double-precision floating-point 2x4 matrix.
 	/// Medium double-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f64, mediump> mediump_f64mat2x4;
+	typedef mat<2, 4, f64, mediump> mediump_f64mat2x4;
 
 
 	/// Medium double-precision floating-point 3x2 matrix.
 	/// Medium double-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f64, mediump> mediump_f64mat3x2;
+	typedef mat<3, 2, f64, mediump> mediump_f64mat3x2;
 
 
 	/// Medium double-precision floating-point 3x3 matrix.
 	/// Medium double-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f64, mediump> mediump_f64mat3x3;
+	typedef mat<3, 3, f64, mediump> mediump_f64mat3x3;
 
 
 	/// Medium double-precision floating-point 3x4 matrix.
 	/// Medium double-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f64, mediump> mediump_f64mat3x4;
+	typedef mat<3, 4, f64, mediump> mediump_f64mat3x4;
 
 
 	/// Medium double-precision floating-point 4x2 matrix.
 	/// Medium double-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f64, mediump> mediump_f64mat4x2;
+	typedef mat<4, 2, f64, mediump> mediump_f64mat4x2;
 
 
 	/// Medium double-precision floating-point 4x3 matrix.
 	/// Medium double-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f64, mediump> mediump_f64mat4x3;
+	typedef mat<4, 3, f64, mediump> mediump_f64mat4x3;
 
 
 	/// Medium double-precision floating-point 4x4 matrix.
 	/// Medium double-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f64, mediump> mediump_f64mat4x4;
+	typedef mat<4, 4, f64, mediump> mediump_f64mat4x4;
 
 
 	/// Medium double-precision floating-point 1x1 matrix.
 	/// Medium double-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
@@ -2171,39 +2171,39 @@ namespace glm
 
 
 	/// High double-precision floating-point 2x2 matrix.
 	/// High double-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f64, highp> highp_f64mat2x2;
+	typedef mat<2, 2, f64, highp> highp_f64mat2x2;
 
 
 	/// High double-precision floating-point 2x3 matrix.
 	/// High double-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f64, highp> highp_f64mat2x3;
+	typedef mat<2, 3, f64, highp> highp_f64mat2x3;
 
 
 	/// High double-precision floating-point 2x4 matrix.
 	/// High double-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f64, highp> highp_f64mat2x4;
+	typedef mat<2, 4, f64, highp> highp_f64mat2x4;
 
 
 	/// High double-precision floating-point 3x2 matrix.
 	/// High double-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f64, highp> highp_f64mat3x2;
+	typedef mat<3, 2, f64, highp> highp_f64mat3x2;
 
 
 	/// High double-precision floating-point 3x3 matrix.
 	/// High double-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f64, highp> highp_f64mat3x3;
+	typedef mat<3, 3, f64, highp> highp_f64mat3x3;
 
 
 	/// High double-precision floating-point 3x4 matrix.
 	/// High double-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f64, highp> highp_f64mat3x4;
+	typedef mat<3, 4, f64, highp> highp_f64mat3x4;
 
 
 	/// High double-precision floating-point 4x2 matrix.
 	/// High double-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f64, highp> highp_f64mat4x2;
+	typedef mat<4, 2, f64, highp> highp_f64mat4x2;
 
 
 	/// High double-precision floating-point 4x3 matrix.
 	/// High double-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f64, highp> highp_f64mat4x3;
+	typedef mat<4, 3, f64, highp> highp_f64mat4x3;
 
 
 	/// High double-precision floating-point 4x4 matrix.
 	/// High double-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f64, highp> highp_f64mat4x4;
+	typedef mat<4, 4, f64, highp> highp_f64mat4x4;
 
 
 	/// High double-precision floating-point 1x1 matrix.
 	/// High double-precision floating-point 1x1 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision

+ 72 - 72
glm/gtc/matrix_integer.hpp

@@ -33,300 +33,300 @@ namespace glm
 
 
 	/// High-precision signed integer 2x2 matrix.
 	/// High-precision signed integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<int, highp>				highp_imat2;
+	typedef mat<2, 2, int, highp>				highp_imat2;
 
 
 	/// High-precision signed integer 3x3 matrix.
 	/// High-precision signed integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<int, highp>				highp_imat3;
+	typedef mat<3, 3, int, highp>				highp_imat3;
 
 
 	/// High-precision signed integer 4x4 matrix.
 	/// High-precision signed integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<int, highp>				highp_imat4;
+	typedef mat<4, 4, int, highp>				highp_imat4;
 
 
 	/// High-precision signed integer 2x2 matrix.
 	/// High-precision signed integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<int, highp>				highp_imat2x2;
+	typedef mat<2, 2, int, highp>				highp_imat2x2;
 
 
 	/// High-precision signed integer 2x3 matrix.
 	/// High-precision signed integer 2x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x3<int, highp>				highp_imat2x3;
+	typedef mat<2, 3, int, highp>				highp_imat2x3;
 
 
 	/// High-precision signed integer 2x4 matrix.
 	/// High-precision signed integer 2x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x4<int, highp>				highp_imat2x4;
+	typedef mat<2, 4, int, highp>				highp_imat2x4;
 
 
 	/// High-precision signed integer 3x2 matrix.
 	/// High-precision signed integer 3x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x2<int, highp>				highp_imat3x2;
+	typedef mat<3, 2, int, highp>				highp_imat3x2;
 
 
 	/// High-precision signed integer 3x3 matrix.
 	/// High-precision signed integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<int, highp>				highp_imat3x3;
+	typedef mat<3, 3, int, highp>				highp_imat3x3;
 
 
 	/// High-precision signed integer 3x4 matrix.
 	/// High-precision signed integer 3x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x4<int, highp>				highp_imat3x4;
+	typedef mat<3, 4, int, highp>				highp_imat3x4;
 
 
 	/// High-precision signed integer 4x2 matrix.
 	/// High-precision signed integer 4x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x2<int, highp>				highp_imat4x2;
+	typedef mat<4, 2, int, highp>				highp_imat4x2;
 
 
 	/// High-precision signed integer 4x3 matrix.
 	/// High-precision signed integer 4x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x3<int, highp>				highp_imat4x3;
+	typedef mat<4, 3, int, highp>				highp_imat4x3;
 
 
 	/// High-precision signed integer 4x4 matrix.
 	/// High-precision signed integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<int, highp>				highp_imat4x4;
+	typedef mat<4, 4, int, highp>				highp_imat4x4;
 
 
 
 
 	/// Medium-precision signed integer 2x2 matrix.
 	/// Medium-precision signed integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<int, mediump>			mediump_imat2;
+	typedef mat<2, 2, int, mediump>			mediump_imat2;
 
 
 	/// Medium-precision signed integer 3x3 matrix.
 	/// Medium-precision signed integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<int, mediump>			mediump_imat3;
+	typedef mat<3, 3, int, mediump>			mediump_imat3;
 
 
 	/// Medium-precision signed integer 4x4 matrix.
 	/// Medium-precision signed integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<int, mediump>			mediump_imat4;
+	typedef mat<4, 4, int, mediump>			mediump_imat4;
 
 
 
 
 	/// Medium-precision signed integer 2x2 matrix.
 	/// Medium-precision signed integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<int, mediump>			mediump_imat2x2;
+	typedef mat<2, 2, int, mediump>			mediump_imat2x2;
 
 
 	/// Medium-precision signed integer 2x3 matrix.
 	/// Medium-precision signed integer 2x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x3<int, mediump>			mediump_imat2x3;
+	typedef mat<2, 3, int, mediump>			mediump_imat2x3;
 
 
 	/// Medium-precision signed integer 2x4 matrix.
 	/// Medium-precision signed integer 2x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x4<int, mediump>			mediump_imat2x4;
+	typedef mat<2, 4, int, mediump>			mediump_imat2x4;
 
 
 	/// Medium-precision signed integer 3x2 matrix.
 	/// Medium-precision signed integer 3x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x2<int, mediump>			mediump_imat3x2;
+	typedef mat<3, 2, int, mediump>			mediump_imat3x2;
 
 
 	/// Medium-precision signed integer 3x3 matrix.
 	/// Medium-precision signed integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<int, mediump>			mediump_imat3x3;
+	typedef mat<3, 3, int, mediump>			mediump_imat3x3;
 
 
 	/// Medium-precision signed integer 3x4 matrix.
 	/// Medium-precision signed integer 3x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x4<int, mediump>			mediump_imat3x4;
+	typedef mat<3, 4, int, mediump>			mediump_imat3x4;
 
 
 	/// Medium-precision signed integer 4x2 matrix.
 	/// Medium-precision signed integer 4x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x2<int, mediump>			mediump_imat4x2;
+	typedef mat<4, 2, int, mediump>			mediump_imat4x2;
 
 
 	/// Medium-precision signed integer 4x3 matrix.
 	/// Medium-precision signed integer 4x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x3<int, mediump>			mediump_imat4x3;
+	typedef mat<4, 3, int, mediump>			mediump_imat4x3;
 
 
 	/// Medium-precision signed integer 4x4 matrix.
 	/// Medium-precision signed integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<int, mediump>			mediump_imat4x4;
+	typedef mat<4, 4, int, mediump>			mediump_imat4x4;
 
 
 
 
 	/// Low-precision signed integer 2x2 matrix.
 	/// Low-precision signed integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<int, lowp>				lowp_imat2;
+	typedef mat<2, 2, int, lowp>				lowp_imat2;
 	
 	
 	/// Low-precision signed integer 3x3 matrix.
 	/// Low-precision signed integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<int, lowp>				lowp_imat3;
+	typedef mat<3, 3, int, lowp>				lowp_imat3;
 
 
 	/// Low-precision signed integer 4x4 matrix.
 	/// Low-precision signed integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<int, lowp>				lowp_imat4;
+	typedef mat<4, 4, int, lowp>				lowp_imat4;
 
 
 
 
 	/// Low-precision signed integer 2x2 matrix.
 	/// Low-precision signed integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<int, lowp>				lowp_imat2x2;
+	typedef mat<2, 2, int, lowp>				lowp_imat2x2;
 
 
 	/// Low-precision signed integer 2x3 matrix.
 	/// Low-precision signed integer 2x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x3<int, lowp>				lowp_imat2x3;
+	typedef mat<2, 3, int, lowp>				lowp_imat2x3;
 
 
 	/// Low-precision signed integer 2x4 matrix.
 	/// Low-precision signed integer 2x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x4<int, lowp>				lowp_imat2x4;
+	typedef mat<2, 4, int, lowp>				lowp_imat2x4;
 
 
 	/// Low-precision signed integer 3x2 matrix.
 	/// Low-precision signed integer 3x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x2<int, lowp>				lowp_imat3x2;
+	typedef mat<3, 2, int, lowp>				lowp_imat3x2;
 
 
 	/// Low-precision signed integer 3x3 matrix.
 	/// Low-precision signed integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<int, lowp>				lowp_imat3x3;
+	typedef mat<3, 3, int, lowp>				lowp_imat3x3;
 
 
 	/// Low-precision signed integer 3x4 matrix.
 	/// Low-precision signed integer 3x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x4<int, lowp>				lowp_imat3x4;
+	typedef mat<3, 4, int, lowp>				lowp_imat3x4;
 
 
 	/// Low-precision signed integer 4x2 matrix.
 	/// Low-precision signed integer 4x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x2<int, lowp>				lowp_imat4x2;
+	typedef mat<4, 2, int, lowp>				lowp_imat4x2;
 
 
 	/// Low-precision signed integer 4x3 matrix.
 	/// Low-precision signed integer 4x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x3<int, lowp>				lowp_imat4x3;
+	typedef mat<4, 3, int, lowp>				lowp_imat4x3;
 
 
 	/// Low-precision signed integer 4x4 matrix.
 	/// Low-precision signed integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<int, lowp>				lowp_imat4x4;
+	typedef mat<4, 4, int, lowp>				lowp_imat4x4;
 
 
 
 
 	/// High-precision unsigned integer 2x2 matrix.
 	/// High-precision unsigned integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<uint, highp>				highp_umat2;	
+	typedef mat<2, 2, uint, highp>				highp_umat2;	
 
 
 	/// High-precision unsigned integer 3x3 matrix.
 	/// High-precision unsigned integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<uint, highp>				highp_umat3;
+	typedef mat<3, 3, uint, highp>				highp_umat3;
 
 
 	/// High-precision unsigned integer 4x4 matrix.
 	/// High-precision unsigned integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<uint, highp>				highp_umat4;
+	typedef mat<4, 4, uint, highp>				highp_umat4;
 
 
 	/// High-precision unsigned integer 2x2 matrix.
 	/// High-precision unsigned integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<uint, highp>				highp_umat2x2;
+	typedef mat<2, 2, uint, highp>				highp_umat2x2;
 
 
 	/// High-precision unsigned integer 2x3 matrix.
 	/// High-precision unsigned integer 2x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x3<uint, highp>				highp_umat2x3;
+	typedef mat<2, 3, uint, highp>				highp_umat2x3;
 
 
 	/// High-precision unsigned integer 2x4 matrix.
 	/// High-precision unsigned integer 2x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x4<uint, highp>				highp_umat2x4;
+	typedef mat<2, 4, uint, highp>				highp_umat2x4;
 
 
 	/// High-precision unsigned integer 3x2 matrix.
 	/// High-precision unsigned integer 3x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x2<uint, highp>				highp_umat3x2;
+	typedef mat<3, 2, uint, highp>				highp_umat3x2;
 
 
 	/// High-precision unsigned integer 3x3 matrix.
 	/// High-precision unsigned integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<uint, highp>				highp_umat3x3;
+	typedef mat<3, 3, uint, highp>				highp_umat3x3;
 
 
 	/// High-precision unsigned integer 3x4 matrix.
 	/// High-precision unsigned integer 3x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x4<uint, highp>				highp_umat3x4;
+	typedef mat<3, 4, uint, highp>				highp_umat3x4;
 
 
 	/// High-precision unsigned integer 4x2 matrix.
 	/// High-precision unsigned integer 4x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x2<uint, highp>				highp_umat4x2;
+	typedef mat<4, 2, uint, highp>				highp_umat4x2;
 
 
 	/// High-precision unsigned integer 4x3 matrix.
 	/// High-precision unsigned integer 4x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x3<uint, highp>				highp_umat4x3;
+	typedef mat<4, 3, uint, highp>				highp_umat4x3;
 
 
 	/// High-precision unsigned integer 4x4 matrix.
 	/// High-precision unsigned integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<uint, highp>				highp_umat4x4;
+	typedef mat<4, 4, uint, highp>				highp_umat4x4;
 
 
 
 
 	/// Medium-precision unsigned integer 2x2 matrix.
 	/// Medium-precision unsigned integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<uint, mediump>			mediump_umat2;
+	typedef mat<2, 2, uint, mediump>			mediump_umat2;
 
 
 	/// Medium-precision unsigned integer 3x3 matrix.
 	/// Medium-precision unsigned integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<uint, mediump>			mediump_umat3;
+	typedef mat<3, 3, uint, mediump>			mediump_umat3;
 
 
 	/// Medium-precision unsigned integer 4x4 matrix.
 	/// Medium-precision unsigned integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<uint, mediump>			mediump_umat4;
+	typedef mat<4, 4, uint, mediump>			mediump_umat4;
 
 
 
 
 	/// Medium-precision unsigned integer 2x2 matrix.
 	/// Medium-precision unsigned integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<uint, mediump>			mediump_umat2x2;
+	typedef mat<2, 2, uint, mediump>			mediump_umat2x2;
 
 
 	/// Medium-precision unsigned integer 2x3 matrix.
 	/// Medium-precision unsigned integer 2x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x3<uint, mediump>			mediump_umat2x3;
+	typedef mat<2, 3, uint, mediump>			mediump_umat2x3;
 
 
 	/// Medium-precision unsigned integer 2x4 matrix.
 	/// Medium-precision unsigned integer 2x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x4<uint, mediump>			mediump_umat2x4;
+	typedef mat<2, 4, uint, mediump>			mediump_umat2x4;
 
 
 	/// Medium-precision unsigned integer 3x2 matrix.
 	/// Medium-precision unsigned integer 3x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x2<uint, mediump>			mediump_umat3x2;
+	typedef mat<3, 2, uint, mediump>			mediump_umat3x2;
 
 
 	/// Medium-precision unsigned integer 3x3 matrix.
 	/// Medium-precision unsigned integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<uint, mediump>			mediump_umat3x3;
+	typedef mat<3, 3, uint, mediump>			mediump_umat3x3;
 
 
 	/// Medium-precision unsigned integer 3x4 matrix.
 	/// Medium-precision unsigned integer 3x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x4<uint, mediump>			mediump_umat3x4;
+	typedef mat<3, 4, uint, mediump>			mediump_umat3x4;
 
 
 	/// Medium-precision unsigned integer 4x2 matrix.
 	/// Medium-precision unsigned integer 4x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x2<uint, mediump>			mediump_umat4x2;
+	typedef mat<4, 2, uint, mediump>			mediump_umat4x2;
 
 
 	/// Medium-precision unsigned integer 4x3 matrix.
 	/// Medium-precision unsigned integer 4x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x3<uint, mediump>			mediump_umat4x3;
+	typedef mat<4, 3, uint, mediump>			mediump_umat4x3;
 
 
 	/// Medium-precision unsigned integer 4x4 matrix.
 	/// Medium-precision unsigned integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<uint, mediump>			mediump_umat4x4;
+	typedef mat<4, 4, uint, mediump>			mediump_umat4x4;
 
 
 
 
 	/// Low-precision unsigned integer 2x2 matrix.
 	/// Low-precision unsigned integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<uint, lowp>				lowp_umat2;
+	typedef mat<2, 2, uint, lowp>				lowp_umat2;
 	
 	
 	/// Low-precision unsigned integer 3x3 matrix.
 	/// Low-precision unsigned integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<uint, lowp>				lowp_umat3;
+	typedef mat<3, 3, uint, lowp>				lowp_umat3;
 
 
 	/// Low-precision unsigned integer 4x4 matrix.
 	/// Low-precision unsigned integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<uint, lowp>				lowp_umat4;
+	typedef mat<4, 4, uint, lowp>				lowp_umat4;
 
 
 
 
 	/// Low-precision unsigned integer 2x2 matrix.
 	/// Low-precision unsigned integer 2x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x2<uint, lowp>				lowp_umat2x2;
+	typedef mat<2, 2, uint, lowp>				lowp_umat2x2;
 
 
 	/// Low-precision unsigned integer 2x3 matrix.
 	/// Low-precision unsigned integer 2x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x3<uint, lowp>				lowp_umat2x3;
+	typedef mat<2, 3, uint, lowp>				lowp_umat2x3;
 
 
 	/// Low-precision unsigned integer 2x4 matrix.
 	/// Low-precision unsigned integer 2x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat2x4<uint, lowp>				lowp_umat2x4;
+	typedef mat<2, 4, uint, lowp>				lowp_umat2x4;
 
 
 	/// Low-precision unsigned integer 3x2 matrix.
 	/// Low-precision unsigned integer 3x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x2<uint, lowp>				lowp_umat3x2;
+	typedef mat<3, 2, uint, lowp>				lowp_umat3x2;
 
 
 	/// Low-precision unsigned integer 3x3 matrix.
 	/// Low-precision unsigned integer 3x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x3<uint, lowp>				lowp_umat3x3;
+	typedef mat<3, 3, uint, lowp>				lowp_umat3x3;
 
 
 	/// Low-precision unsigned integer 3x4 matrix.
 	/// Low-precision unsigned integer 3x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat3x4<uint, lowp>				lowp_umat3x4;
+	typedef mat<3, 4, uint, lowp>				lowp_umat3x4;
 
 
 	/// Low-precision unsigned integer 4x2 matrix.
 	/// Low-precision unsigned integer 4x2 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x2<uint, lowp>				lowp_umat4x2;
+	typedef mat<4, 2, uint, lowp>				lowp_umat4x2;
 
 
 	/// Low-precision unsigned integer 4x3 matrix.
 	/// Low-precision unsigned integer 4x3 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x3<uint, lowp>				lowp_umat4x3;
+	typedef mat<4, 3, uint, lowp>				lowp_umat4x3;
 
 
 	/// Low-precision unsigned integer 4x4 matrix.
 	/// Low-precision unsigned integer 4x4 matrix.
 	/// @see gtc_matrix_integer
 	/// @see gtc_matrix_integer
-	typedef tmat4x4<uint, lowp>				lowp_umat4x4;
+	typedef mat<4, 4, uint, lowp>				lowp_umat4x4;
 
 
 #if(defined(GLM_PRECISION_HIGHP_INT))
 #if(defined(GLM_PRECISION_HIGHP_INT))
 	typedef highp_imat2								imat2;
 	typedef highp_imat2								imat2;

+ 12 - 12
glm/gtc/matrix_inverse.inl

@@ -4,22 +4,22 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> affineInverse(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> affineInverse(mat<3, 3, T, P> const & m)
 	{
 	{
-		tmat2x2<T, P> const Inv(inverse(tmat2x2<T, P>(m)));
+		mat<2, 2, T, P> const Inv(inverse(mat<2, 2, T, P>(m)));
 
 
-		return tmat3x3<T, P>(
+		return mat<3, 3, T, P>(
 			vec<3, T, P>(Inv[0], static_cast<T>(0)),
 			vec<3, T, P>(Inv[0], static_cast<T>(0)),
 			vec<3, T, P>(Inv[1], static_cast<T>(0)),
 			vec<3, T, P>(Inv[1], static_cast<T>(0)),
 			vec<3, T, P>(-Inv * vec<2, T, P>(m[2]), static_cast<T>(1)));
 			vec<3, T, P>(-Inv * vec<2, T, P>(m[2]), static_cast<T>(1)));
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> affineInverse(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> affineInverse(mat<4, 4, T, P> const & m)
 	{
 	{
-		tmat3x3<T, P> const Inv(inverse(tmat3x3<T, P>(m)));
+		mat<3, 3, T, P> const Inv(inverse(mat<3, 3, T, P>(m)));
 
 
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			vec<4, T, P>(Inv[0], static_cast<T>(0)),
 			vec<4, T, P>(Inv[0], static_cast<T>(0)),
 			vec<4, T, P>(Inv[1], static_cast<T>(0)),
 			vec<4, T, P>(Inv[1], static_cast<T>(0)),
 			vec<4, T, P>(Inv[2], static_cast<T>(0)),
 			vec<4, T, P>(Inv[2], static_cast<T>(0)),
@@ -27,11 +27,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> inverseTranspose(tmat2x2<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> inverseTranspose(mat<2, 2, T, P> const & m)
 	{
 	{
 		T Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];
 		T Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];
 
 
-		tmat2x2<T, P> Inverse(
+		mat<2, 2, T, P> Inverse(
 			+ m[1][1] / Determinant,
 			+ m[1][1] / Determinant,
 			- m[0][1] / Determinant,
 			- m[0][1] / Determinant,
 			- m[1][0] / Determinant,
 			- m[1][0] / Determinant,
@@ -41,14 +41,14 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> inverseTranspose(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> inverseTranspose(mat<3, 3, T, P> const & m)
 	{
 	{
 		T Determinant =
 		T Determinant =
 			+ m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])
 			+ m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])
 			- m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])
 			- m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])
 			+ m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);
 			+ m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);
 
 
-		tmat3x3<T, P> Inverse(uninitialize);
+		mat<3, 3, T, P> Inverse(uninitialize);
 		Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);
 		Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);
 		Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);
 		Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);
 		Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);
 		Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);
@@ -64,7 +64,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> inverseTranspose(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> inverseTranspose(mat<4, 4, T, P> const & m)
 	{
 	{
 		T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
 		T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
 		T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
 		T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
@@ -86,7 +86,7 @@ namespace glm
 		T SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
 		T SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
 		T SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
 		T SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
 
 
-		tmat4x4<T, P> Inverse(uninitialize);
+		mat<4, 4, T, P> Inverse(uninitialize);
 		Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02);
 		Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02);
 		Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04);
 		Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04);
 		Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05);
 		Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05);

+ 35 - 35
glm/gtc/matrix_transform.hpp

@@ -52,11 +52,11 @@ namespace glm
 	/// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f
 	/// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f
 	/// @endcode
 	/// @endcode
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
-	/// @see - translate(tmat4x4<T, P> const & m, T x, T y, T z)
+	/// @see - translate(mat<4, 4, T, P> const & m, T x, T y, T z)
 	/// @see - translate(vec<3, T, P> const & v)
 	/// @see - translate(vec<3, T, P> const & v)
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> translate(
-		tmat4x4<T, P> const & m,
+	GLM_FUNC_DECL mat<4, 4, T, P> translate(
+		mat<4, 4, T, P> const& m,
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 		
 		
 	/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. 
 	/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. 
@@ -66,11 +66,11 @@ namespace glm
 	/// @param axis Rotation axis, recommended to be normalized.
 	/// @param axis Rotation axis, recommended to be normalized.
 	/// @tparam T Value type used to build the matrix. Supported: half, float or double.
 	/// @tparam T Value type used to build the matrix. Supported: half, float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
-	/// @see - rotate(tmat4x4<T, P> const & m, T angle, T x, T y, T z) 
+	/// @see - rotate(mat<4, 4, T, P> const & m, T angle, T x, T y, T z) 
 	/// @see - rotate(T angle, vec<3, T, P> const & v) 
 	/// @see - rotate(T angle, vec<3, T, P> const & v) 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> rotate(
-		tmat4x4<T, P> const & m,
+	GLM_FUNC_DECL mat<4, 4, T, P> rotate(
+		mat<4, 4, T, P> const& m,
 		T angle,
 		T angle,
 		vec<3, T, P> const & axis);
 		vec<3, T, P> const & axis);
 
 
@@ -80,11 +80,11 @@ namespace glm
 	/// @param v Ratio of scaling for each axis.
 	/// @param v Ratio of scaling for each axis.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
-	/// @see - scale(tmat4x4<T, P> const & m, T x, T y, T z)
+	/// @see - scale(mat<4, 4, T, P> const & m, T x, T y, T z)
 	/// @see - scale(vec<3, T, P> const & v)
 	/// @see - scale(vec<3, T, P> const & v)
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> scale(
-		tmat4x4<T, P> const & m,
+	GLM_FUNC_DECL mat<4, 4, T, P> scale(
+		mat<4, 4, T, P> const& m,
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 
 
 	/// Creates a matrix for an orthographic parallel viewing volume, using the default handedness.
 	/// Creates a matrix for an orthographic parallel viewing volume, using the default handedness.
@@ -99,7 +99,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> ortho(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
 		T left,
 		T left,
 		T right,
 		T right,
 		T bottom,
 		T bottom,
@@ -119,7 +119,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> orthoLH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH(
 		T left,
 		T left,
 		T right,
 		T right,
 		T bottom,
 		T bottom,
@@ -139,7 +139,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> orthoRH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH(
 		T left,
 		T left,
 		T right,
 		T right,
 		T bottom,
 		T bottom,
@@ -157,7 +157,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)
 	/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> ortho(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
 		T left,
 		T left,
 		T right,
 		T right,
 		T bottom,
 		T bottom,
@@ -174,7 +174,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> frustum(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> frustum(
 		T left,
 		T left,
 		T right,
 		T right,
 		T bottom,
 		T bottom,
@@ -193,7 +193,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> frustumLH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumLH(
 		T left,
 		T left,
 		T right,
 		T right,
 		T bottom,
 		T bottom,
@@ -212,7 +212,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> frustumRH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumRH(
 		T left,
 		T left,
 		T right,
 		T right,
 		T bottom,
 		T bottom,
@@ -229,7 +229,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> perspective(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> perspective(
 		T fovy,
 		T fovy,
 		T aspect,
 		T aspect,
 		T near,
 		T near,
@@ -244,7 +244,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> perspectiveRH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveRH(
 		T fovy,
 		T fovy,
 		T aspect,
 		T aspect,
 		T near,
 		T near,
@@ -259,7 +259,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> perspectiveLH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveLH(
 		T fovy,
 		T fovy,
 		T aspect,
 		T aspect,
 		T near,
 		T near,
@@ -275,7 +275,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> perspectiveFov(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFov(
 		T fov,
 		T fov,
 		T width,
 		T width,
 		T height,
 		T height,
@@ -292,7 +292,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> perspectiveFovRH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovRH(
 		T fov,
 		T fov,
 		T width,
 		T width,
 		T height,
 		T height,
@@ -309,7 +309,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> perspectiveFovLH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovLH(
 		T fov,
 		T fov,
 		T width,
 		T width,
 		T height,
 		T height,
@@ -324,7 +324,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> infinitePerspective(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspective(
 		T fovy, T aspect, T near);
 		T fovy, T aspect, T near);
 
 
 	/// Creates a matrix for a left handed, symmetric perspective-view frustum with far plane at infinite.
 	/// Creates a matrix for a left handed, symmetric perspective-view frustum with far plane at infinite.
@@ -335,7 +335,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> infinitePerspectiveLH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspectiveLH(
 		T fovy, T aspect, T near);
 		T fovy, T aspect, T near);
 
 
 	/// Creates a matrix for a right handed, symmetric perspective-view frustum with far plane at infinite.
 	/// Creates a matrix for a right handed, symmetric perspective-view frustum with far plane at infinite.
@@ -346,7 +346,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> infinitePerspectiveRH(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspectiveRH(
 		T fovy, T aspect, T near);
 		T fovy, T aspect, T near);
 
 
 	/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
 	/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
@@ -357,7 +357,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> tweakedInfinitePerspective(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> tweakedInfinitePerspective(
 		T fovy, T aspect, T near);
 		T fovy, T aspect, T near);
 
 
 	/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
 	/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
@@ -369,7 +369,7 @@ namespace glm
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> tweakedInfinitePerspective(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> tweakedInfinitePerspective(
 		T fovy, T aspect, T near, T ep);
 		T fovy, T aspect, T near, T ep);
 
 
 	/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
 	/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
@@ -385,8 +385,8 @@ namespace glm
 	template <typename T, typename U, precision P>
 	template <typename T, typename U, precision P>
 	GLM_FUNC_DECL vec<3, T, P> project(
 	GLM_FUNC_DECL vec<3, T, P> project(
 		vec<3, T, P> const & obj,
 		vec<3, T, P> const & obj,
-		tmat4x4<T, P> const & model,
-		tmat4x4<T, P> const & proj,
+		mat<4, 4, T, P> const& model,
+		mat<4, 4, T, P> const& proj,
 		vec<4, U, P> const & viewport);
 		vec<4, U, P> const & viewport);
 
 
 	/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
 	/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
@@ -402,8 +402,8 @@ namespace glm
 	template <typename T, typename U, precision P>
 	template <typename T, typename U, precision P>
 	GLM_FUNC_DECL vec<3, T, P> unProject(
 	GLM_FUNC_DECL vec<3, T, P> unProject(
 		vec<3, T, P> const & win,
 		vec<3, T, P> const & win,
-		tmat4x4<T, P> const & model,
-		tmat4x4<T, P> const & proj,
+		mat<4, 4, T, P> const& model,
+		mat<4, 4, T, P> const& proj,
 		vec<4, U, P> const & viewport);
 		vec<4, U, P> const & viewport);
 
 
 	/// Define a picking region
 	/// Define a picking region
@@ -415,7 +415,7 @@ namespace glm
 	/// @tparam U Currently supported: Floating-point types and integer types.
 	/// @tparam U Currently supported: Floating-point types and integer types.
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	template <typename T, precision P, typename U>
 	template <typename T, precision P, typename U>
-	GLM_FUNC_DECL tmat4x4<T, P> pickMatrix(
+	GLM_FUNC_DECL mat<4, 4, T, P> pickMatrix(
 		vec<2, T, P> const & center,
 		vec<2, T, P> const & center,
 		vec<2, T, P> const & delta,
 		vec<2, T, P> const & delta,
 		vec<4, U, P> const & viewport);
 		vec<4, U, P> const & viewport);
@@ -428,7 +428,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
 	/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> lookAt(
+	GLM_FUNC_DECL mat<4, 4, T, P> lookAt(
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & up);
 		vec<3, T, P> const & up);
@@ -441,7 +441,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
 	/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> lookAtRH(
+	GLM_FUNC_DECL mat<4, 4, T, P> lookAtRH(
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & up);
 		vec<3, T, P> const & up);
@@ -454,7 +454,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
 	/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> lookAtLH(
+	GLM_FUNC_DECL mat<4, 4, T, P> lookAtLH(
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & up);
 		vec<3, T, P> const & up);

+ 53 - 53
glm/gtc/matrix_transform.inl

@@ -8,15 +8,15 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(tmat4x4<T, P> const & m, vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> translate(mat<4, 4, T, P> const & m, vec<3, T, P> const & v)
 	{
 	{
-		tmat4x4<T, P> Result(m);
+		mat<4, 4, T, P> Result(m);
 		Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
 		Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
 		return Result;
 		return Result;
 	}
 	}
 	
 	
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(tmat4x4<T, P> const & m, T angle, vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate(mat<4, 4, T, P> const & m, T angle, vec<3, T, P> const & v)
 	{
 	{
 		T const a = angle;
 		T const a = angle;
 		T const c = cos(a);
 		T const c = cos(a);
@@ -25,7 +25,7 @@ namespace glm
 		vec<3, T, P> axis(normalize(v));
 		vec<3, T, P> axis(normalize(v));
 		vec<3, T, P> temp((T(1) - c) * axis);
 		vec<3, T, P> temp((T(1) - c) * axis);
 
 
-		tmat4x4<T, P> Rotate(uninitialize);
+		mat<4, 4, T, P> Rotate(uninitialize);
 		Rotate[0][0] = c + temp[0] * axis[0];
 		Rotate[0][0] = c + temp[0] * axis[0];
 		Rotate[0][1] = temp[0] * axis[1] + s * axis[2];
 		Rotate[0][1] = temp[0] * axis[1] + s * axis[2];
 		Rotate[0][2] = temp[0] * axis[2] - s * axis[1];
 		Rotate[0][2] = temp[0] * axis[2] - s * axis[1];
@@ -38,7 +38,7 @@ namespace glm
 		Rotate[2][1] = temp[2] * axis[1] - s * axis[0];
 		Rotate[2][1] = temp[2] * axis[1] - s * axis[0];
 		Rotate[2][2] = c + temp[2] * axis[2];
 		Rotate[2][2] = c + temp[2] * axis[2];
 
 
-		tmat4x4<T, P> Result(uninitialize);
+		mat<4, 4, T, P> Result(uninitialize);
 		Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
 		Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
 		Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
 		Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
 		Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
 		Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
@@ -47,12 +47,12 @@ namespace glm
 	}
 	}
 		
 		
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow(tmat4x4<T, P> const & m, T angle, vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate_slow(mat<4, 4, T, P> const & m, T angle, vec<3, T, P> const & v)
 	{
 	{
 		T const a = angle;
 		T const a = angle;
 		T const c = cos(a);
 		T const c = cos(a);
 		T const s = sin(a);
 		T const s = sin(a);
-		tmat4x4<T, P> Result;
+		mat<4, 4, T, P> Result;
 
 
 		vec<3, T, P> axis = normalize(v);
 		vec<3, T, P> axis = normalize(v);
 
 
@@ -76,9 +76,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(tmat4x4<T, P> const & m, vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(mat<4, 4, T, P> const & m, vec<3, T, P> const & v)
 	{
 	{
-		tmat4x4<T, P> Result(uninitialize);
+		mat<4, 4, T, P> Result(uninitialize);
 		Result[0] = m[0] * v[0];
 		Result[0] = m[0] * v[0];
 		Result[1] = m[1] * v[1];
 		Result[1] = m[1] * v[1];
 		Result[2] = m[2] * v[2];
 		Result[2] = m[2] * v[2];
@@ -87,9 +87,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow(tmat4x4<T, P> const & m, vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale_slow(mat<4, 4, T, P> const & m, vec<3, T, P> const & v)
 	{
 	{
-		tmat4x4<T, P> Result(T(1));
+		mat<4, 4, T, P> Result(T(1));
 		Result[0][0] = v.x;
 		Result[0][0] = v.x;
 		Result[1][1] = v.y;
 		Result[1][1] = v.y;
 		Result[2][2] = v.z;
 		Result[2][2] = v.z;
@@ -97,7 +97,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> ortho
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> ortho
 	(
 	(
 		T left, T right,
 		T left, T right,
 		T bottom, T top,
 		T bottom, T top,
@@ -112,14 +112,14 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> orthoLH
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoLH
 	(
 	(
 		T left, T right,
 		T left, T right,
 		T bottom, T top,
 		T bottom, T top,
 		T zNear, T zFar
 		T zNear, T zFar
 	)
 	)
 	{
 	{
-		tmat4x4<T, defaultp> Result(1);
+		mat<4, 4, T, defaultp> Result(1);
 		Result[0][0] = static_cast<T>(2) / (right - left);
 		Result[0][0] = static_cast<T>(2) / (right - left);
 		Result[1][1] = static_cast<T>(2) / (top - bottom);
 		Result[1][1] = static_cast<T>(2) / (top - bottom);
 		Result[3][0] = - (right + left) / (right - left);
 		Result[3][0] = - (right + left) / (right - left);
@@ -137,14 +137,14 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> orthoRH
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoRH
 	(
 	(
 		T left, T right,
 		T left, T right,
 		T bottom, T top,
 		T bottom, T top,
 		T zNear, T zFar
 		T zNear, T zFar
 	)
 	)
 	{
 	{
-		tmat4x4<T, defaultp> Result(1);
+		mat<4, 4, T, defaultp> Result(1);
 		Result[0][0] = static_cast<T>(2) / (right - left);
 		Result[0][0] = static_cast<T>(2) / (right - left);
 		Result[1][1] = static_cast<T>(2) / (top - bottom);
 		Result[1][1] = static_cast<T>(2) / (top - bottom);
 		Result[3][0] = - (right + left) / (right - left);
 		Result[3][0] = - (right + left) / (right - left);
@@ -162,13 +162,13 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> ortho
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> ortho
 	(
 	(
 		T left, T right,
 		T left, T right,
 		T bottom, T top
 		T bottom, T top
 	)
 	)
 	{
 	{
-		tmat4x4<T, defaultp> Result(static_cast<T>(1));
+		mat<4, 4, T, defaultp> Result(static_cast<T>(1));
 		Result[0][0] = static_cast<T>(2) / (right - left);
 		Result[0][0] = static_cast<T>(2) / (right - left);
 		Result[1][1] = static_cast<T>(2) / (top - bottom);
 		Result[1][1] = static_cast<T>(2) / (top - bottom);
 		Result[2][2] = - static_cast<T>(1);
 		Result[2][2] = - static_cast<T>(1);
@@ -178,7 +178,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> frustum
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustum
 	(
 	(
 		T left, T right,
 		T left, T right,
 		T bottom, T top,
 		T bottom, T top,
@@ -193,14 +193,14 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> frustumLH
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumLH
 	(
 	(
 		T left, T right,
 		T left, T right,
 		T bottom, T top,
 		T bottom, T top,
 		T nearVal, T farVal
 		T nearVal, T farVal
 	)
 	)
 	{
 	{
-		tmat4x4<T, defaultp> Result(0);
+		mat<4, 4, T, defaultp> Result(0);
 		Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
 		Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
 		Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
 		Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
 		Result[2][0] = (right + left) / (right - left);
 		Result[2][0] = (right + left) / (right - left);
@@ -219,14 +219,14 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> frustumRH
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumRH
 	(
 	(
 		T left, T right,
 		T left, T right,
 		T bottom, T top,
 		T bottom, T top,
 		T nearVal, T farVal
 		T nearVal, T farVal
 	)
 	)
 	{
 	{
-		tmat4x4<T, defaultp> Result(0);
+		mat<4, 4, T, defaultp> Result(0);
 		Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
 		Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
 		Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
 		Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
 		Result[2][0] = (right + left) / (right - left);
 		Result[2][0] = (right + left) / (right - left);
@@ -245,7 +245,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspective(T fovy, T aspect, T zNear, T zFar)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspective(T fovy, T aspect, T zNear, T zFar)
 	{
 	{
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 			return perspectiveLH(fovy, aspect, zNear, zFar);
 			return perspectiveLH(fovy, aspect, zNear, zFar);
@@ -255,13 +255,13 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveRH(T fovy, T aspect, T zNear, T zFar)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveRH(T fovy, T aspect, T zNear, T zFar)
 	{
 	{
 		assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
 		assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
 
 
 		T const tanHalfFovy = tan(fovy / static_cast<T>(2));
 		T const tanHalfFovy = tan(fovy / static_cast<T>(2));
 
 
-		tmat4x4<T, defaultp> Result(static_cast<T>(0));
+		mat<4, 4, T, defaultp> Result(static_cast<T>(0));
 		Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
 		Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
 		Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
 		Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
 		Result[2][3] = - static_cast<T>(1);
 		Result[2][3] = - static_cast<T>(1);
@@ -278,13 +278,13 @@ namespace glm
 	}
 	}
 	
 	
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveLH(T fovy, T aspect, T zNear, T zFar)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveLH(T fovy, T aspect, T zNear, T zFar)
 	{
 	{
 		assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
 		assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
 
 
 		T const tanHalfFovy = tan(fovy / static_cast<T>(2));
 		T const tanHalfFovy = tan(fovy / static_cast<T>(2));
 		
 		
-		tmat4x4<T, defaultp> Result(static_cast<T>(0));
+		mat<4, 4, T, defaultp> Result(static_cast<T>(0));
 		Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
 		Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
 		Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
 		Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
 		Result[2][3] = static_cast<T>(1);
 		Result[2][3] = static_cast<T>(1);
@@ -301,7 +301,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFov(T fov, T width, T height, T zNear, T zFar)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFov(T fov, T width, T height, T zNear, T zFar)
 	{
 	{
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 			return perspectiveFovLH(fov, width, height, zNear, zFar);
 			return perspectiveFovLH(fov, width, height, zNear, zFar);
@@ -311,7 +311,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovRH(T fov, T width, T height, T zNear, T zFar)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovRH(T fov, T width, T height, T zNear, T zFar)
 	{
 	{
 		assert(width > static_cast<T>(0));
 		assert(width > static_cast<T>(0));
 		assert(height > static_cast<T>(0));
 		assert(height > static_cast<T>(0));
@@ -321,7 +321,7 @@ namespace glm
 		T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
 		T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
 		T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
 		T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
 
 
-		tmat4x4<T, defaultp> Result(static_cast<T>(0));
+		mat<4, 4, T, defaultp> Result(static_cast<T>(0));
 		Result[0][0] = w;
 		Result[0][0] = w;
 		Result[1][1] = h;
 		Result[1][1] = h;
 		Result[2][3] = - static_cast<T>(1);
 		Result[2][3] = - static_cast<T>(1);
@@ -338,7 +338,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovLH(T fov, T width, T height, T zNear, T zFar)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovLH(T fov, T width, T height, T zNear, T zFar)
 	{
 	{
 		assert(width > static_cast<T>(0));
 		assert(width > static_cast<T>(0));
 		assert(height > static_cast<T>(0));
 		assert(height > static_cast<T>(0));
@@ -348,7 +348,7 @@ namespace glm
 		T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
 		T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
 		T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
 		T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
 
 
-		tmat4x4<T, defaultp> Result(static_cast<T>(0));
+		mat<4, 4, T, defaultp> Result(static_cast<T>(0));
 		Result[0][0] = w;
 		Result[0][0] = w;
 		Result[1][1] = h;
 		Result[1][1] = h;
 		Result[2][3] = static_cast<T>(1);
 		Result[2][3] = static_cast<T>(1);
@@ -365,7 +365,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspective(T fovy, T aspect, T zNear)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> infinitePerspective(T fovy, T aspect, T zNear)
 	{
 	{
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 			return infinitePerspectiveLH(fovy, aspect, zNear);
 			return infinitePerspectiveLH(fovy, aspect, zNear);
@@ -375,7 +375,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveRH(T fovy, T aspect, T zNear)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> infinitePerspectiveRH(T fovy, T aspect, T zNear)
 	{
 	{
 		T const range = tan(fovy / static_cast<T>(2)) * zNear;
 		T const range = tan(fovy / static_cast<T>(2)) * zNear;
 		T const left = -range * aspect;
 		T const left = -range * aspect;
@@ -383,7 +383,7 @@ namespace glm
 		T const bottom = -range;
 		T const bottom = -range;
 		T const top = range;
 		T const top = range;
 
 
-		tmat4x4<T, defaultp> Result(static_cast<T>(0));
+		mat<4, 4, T, defaultp> Result(static_cast<T>(0));
 		Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
 		Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
 		Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
 		Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
 		Result[2][2] = - static_cast<T>(1);
 		Result[2][2] = - static_cast<T>(1);
@@ -393,7 +393,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveLH(T fovy, T aspect, T zNear)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> infinitePerspectiveLH(T fovy, T aspect, T zNear)
 	{
 	{
 		T const range = tan(fovy / static_cast<T>(2)) * zNear;
 		T const range = tan(fovy / static_cast<T>(2)) * zNear;
 		T const left = -range * aspect;
 		T const left = -range * aspect;
@@ -401,7 +401,7 @@ namespace glm
 		T const bottom = -range;
 		T const bottom = -range;
 		T const top = range;
 		T const top = range;
 
 
-		tmat4x4<T, defaultp> Result(T(0));
+		mat<4, 4, T, defaultp> Result(T(0));
 		Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
 		Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
 		Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
 		Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
 		Result[2][2] = static_cast<T>(1);
 		Result[2][2] = static_cast<T>(1);
@@ -412,7 +412,7 @@ namespace glm
 
 
 	// Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf
 	// Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep)
 	{
 	{
 		T const range = tan(fovy / static_cast<T>(2)) * zNear;	
 		T const range = tan(fovy / static_cast<T>(2)) * zNear;	
 		T const left = -range * aspect;
 		T const left = -range * aspect;
@@ -420,7 +420,7 @@ namespace glm
 		T const bottom = -range;
 		T const bottom = -range;
 		T const top = range;
 		T const top = range;
 
 
-		tmat4x4<T, defaultp> Result(static_cast<T>(0));
+		mat<4, 4, T, defaultp> Result(static_cast<T>(0));
 		Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
 		Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
 		Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
 		Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
 		Result[2][2] = ep - static_cast<T>(1);
 		Result[2][2] = ep - static_cast<T>(1);
@@ -430,7 +430,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear)
 	{
 	{
 		return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>());
 		return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>());
 	}
 	}
@@ -439,8 +439,8 @@ namespace glm
 	GLM_FUNC_QUALIFIER vec<3, T, P> project
 	GLM_FUNC_QUALIFIER vec<3, T, P> project
 	(
 	(
 		vec<3, T, P> const & obj,
 		vec<3, T, P> const & obj,
-		tmat4x4<T, P> const & model,
-		tmat4x4<T, P> const & proj,
+		mat<4, 4, T, P> const& model,
+		mat<4, 4, T, P> const& proj,
 		vec<4, U, P> const & viewport
 		vec<4, U, P> const & viewport
 	)
 	)
 	{
 	{
@@ -465,12 +465,12 @@ namespace glm
 	GLM_FUNC_QUALIFIER vec<3, T, P> unProject
 	GLM_FUNC_QUALIFIER vec<3, T, P> unProject
 	(
 	(
 		vec<3, T, P> const & win,
 		vec<3, T, P> const & win,
-		tmat4x4<T, P> const & model,
-		tmat4x4<T, P> const & proj,
+		mat<4, 4, T, P> const& model,
+		mat<4, 4, T, P> const& proj,
 		vec<4, U, P> const & viewport
 		vec<4, U, P> const & viewport
 	)
 	)
 	{
 	{
-		tmat4x4<T, P> Inverse = inverse(proj * model);
+		mat<4, 4, T, P> Inverse = inverse(proj * model);
 
 
 		vec<4, T, P> tmp = vec<4, T, P>(win, T(1));
 		vec<4, T, P> tmp = vec<4, T, P>(win, T(1));
 		tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
 		tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
@@ -489,10 +489,10 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P, typename U>
 	template <typename T, precision P, typename U>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix(vec<2, T, P> const & center, vec<2, T, P> const & delta, vec<4, U, P> const & viewport)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> pickMatrix(vec<2, T, P> const & center, vec<2, T, P> const & delta, vec<4, U, P> const & viewport)
 	{
 	{
 		assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0));
 		assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0));
-		tmat4x4<T, P> Result(static_cast<T>(1));
+		mat<4, 4, T, P> Result(static_cast<T>(1));
 
 
 		if(!(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)))
 		if(!(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)))
 			return Result; // Error
 			return Result; // Error
@@ -508,7 +508,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt(vec<3, T, P> const & eye, vec<3, T, P> const & center, vec<3, T, P> const & up)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAt(vec<3, T, P> const & eye, vec<3, T, P> const & center, vec<3, T, P> const & up)
 	{
 	{
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 #		if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
 			return lookAtLH(eye, center, up);
 			return lookAtLH(eye, center, up);
@@ -518,7 +518,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAtRH
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtRH
 	(
 	(
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & center,
@@ -529,7 +529,7 @@ namespace glm
 		vec<3, T, P> const s(normalize(cross(f, up)));
 		vec<3, T, P> const s(normalize(cross(f, up)));
 		vec<3, T, P> const u(cross(s, f));
 		vec<3, T, P> const u(cross(s, f));
 
 
-		tmat4x4<T, P> Result(1);
+		mat<4, 4, T, P> Result(1);
 		Result[0][0] = s.x;
 		Result[0][0] = s.x;
 		Result[1][0] = s.y;
 		Result[1][0] = s.y;
 		Result[2][0] = s.z;
 		Result[2][0] = s.z;
@@ -546,7 +546,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAtLH
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtLH
 	(
 	(
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & eye,
 		vec<3, T, P> const & center,
 		vec<3, T, P> const & center,
@@ -557,7 +557,7 @@ namespace glm
 		vec<3, T, P> const s(normalize(cross(up, f)));
 		vec<3, T, P> const s(normalize(cross(up, f)));
 		vec<3, T, P> const u(cross(f, s));
 		vec<3, T, P> const u(cross(f, s));
 
 
-		tmat4x4<T, P> Result(1);
+		mat<4, 4, T, P> Result(1);
 		Result[0][0] = s.x;
 		Result[0][0] = s.x;
 		Result[1][0] = s.y;
 		Result[1][0] = s.y;
 		Result[2][0] = s.z;
 		Result[2][0] = s.z;

+ 8 - 8
glm/gtc/quaternion.hpp

@@ -95,8 +95,8 @@ namespace glm
 
 
 		/// Explicit conversion operators
 		/// Explicit conversion operators
 #		if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
 #		if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
-			GLM_FUNC_DECL explicit operator tmat3x3<T, P>();
-			GLM_FUNC_DECL explicit operator tmat4x4<T, P>();
+			GLM_FUNC_DECL explicit operator mat<3, 3, T, P>();
+			GLM_FUNC_DECL explicit operator mat<4, 4, T, P>();
 #		endif
 #		endif
 
 
 		/// Create a quaternion from two normalized axis
 		/// Create a quaternion from two normalized axis
@@ -109,8 +109,8 @@ namespace glm
 
 
 		/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
 		/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
 		GLM_FUNC_DECL GLM_EXPLICIT tquat(vec<3, T, P> const & eulerAngles);
 		GLM_FUNC_DECL GLM_EXPLICIT tquat(vec<3, T, P> const & eulerAngles);
-		GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat3x3<T, P> const & m);
-		GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat4x4<T, P> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT tquat(mat<3, 3, T, P> const & m);
+		GLM_FUNC_DECL GLM_EXPLICIT tquat(mat<4, 4, T, P> const & m);
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
@@ -279,25 +279,25 @@ namespace glm
 	/// 
 	/// 
 	/// @see gtc_quaternion
 	/// @see gtc_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> mat3_cast(tquat<T, P> const & x);
+	GLM_FUNC_DECL mat<3, 3, T, P> mat3_cast(tquat<T, P> const & x);
 
 
 	/// Converts a quaternion to a 4 * 4 matrix.
 	/// Converts a quaternion to a 4 * 4 matrix.
 	/// 
 	/// 
 	/// @see gtc_quaternion
 	/// @see gtc_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> mat4_cast(tquat<T, P> const & x);
+	GLM_FUNC_DECL mat<4, 4, T, P> mat4_cast(tquat<T, P> const & x);
 
 
 	/// Converts a 3 * 3 matrix to a quaternion.
 	/// Converts a 3 * 3 matrix to a quaternion.
 	/// 
 	/// 
 	/// @see gtc_quaternion
 	/// @see gtc_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tquat<T, P> quat_cast(tmat3x3<T, P> const & x);
+	GLM_FUNC_DECL tquat<T, P> quat_cast(mat<3, 3, T, P> const & x);
 
 
 	/// Converts a 4 * 4 matrix to a quaternion.
 	/// Converts a 4 * 4 matrix to a quaternion.
 	/// 
 	/// 
 	/// @see gtc_quaternion
 	/// @see gtc_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tquat<T, P> quat_cast(tmat4x4<T, P> const & x);
+	GLM_FUNC_DECL tquat<T, P> quat_cast(mat<4, 4, T, P> const & x);
 
 
 	/// Returns the quaternion rotation angle.
 	/// Returns the quaternion rotation angle.
 	///
 	///

+ 11 - 11
glm/gtc/quaternion.inl

@@ -173,26 +173,26 @@ namespace detail
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<3, 3, T, P> const & m)
 	{
 	{
 		*this = quat_cast(m);
 		*this = quat_cast(m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tmat4x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<4, 4, T, P> const & m)
 	{
 	{
 		*this = quat_cast(m);
 		*this = quat_cast(m);
 	}
 	}
 
 
 #	if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
 #	if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P>::operator tmat3x3<T, P>()
+	GLM_FUNC_QUALIFIER tquat<T, P>::operator mat<3, 3, T, P>()
 	{
 	{
 		return mat3_cast(*this);
 		return mat3_cast(*this);
 	}
 	}
 	
 	
 	template <typename T, precision P>	
 	template <typename T, precision P>	
-	GLM_FUNC_QUALIFIER tquat<T, P>::operator tmat4x4<T, P>()
+	GLM_FUNC_QUALIFIER tquat<T, P>::operator mat<4, 4, T, P>()
 	{
 	{
 		return mat4_cast(*this);
 		return mat4_cast(*this);
 	}
 	}
@@ -584,9 +584,9 @@ namespace detail
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> mat3_cast(tquat<T, P> const & q)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat3_cast(tquat<T, P> const & q)
 	{
 	{
-		tmat3x3<T, P> Result(T(1));
+		mat<3, 3, T, P> Result(T(1));
 		T qxx(q.x * q.x);
 		T qxx(q.x * q.x);
 		T qyy(q.y * q.y);
 		T qyy(q.y * q.y);
 		T qzz(q.z * q.z);
 		T qzz(q.z * q.z);
@@ -612,13 +612,13 @@ namespace detail
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> mat4_cast(tquat<T, P> const & q)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat4_cast(tquat<T, P> const & q)
 	{
 	{
-		return tmat4x4<T, P>(mat3_cast(q));
+		return mat<4, 4, T, P>(mat3_cast(q));
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(mat<3, 3, T, P> const & m)
 	{
 	{
 		T fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2];
 		T fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2];
 		T fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2];
 		T fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2];
@@ -682,9 +682,9 @@ namespace detail
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(tmat4x4<T, P> const & m4)
+	GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(mat<4, 4, T, P> const & m4)
 	{
 	{
-		return quat_cast(tmat3x3<T, P>(m4));
+		return quat_cast(mat<3, 3, T, P>(m4));
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>

+ 36 - 36
glm/gtc/type_precision.hpp

@@ -675,15 +675,15 @@ namespace glm
 
 
 	/// Single-precision floating-point 2x2 matrix.
 	/// Single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, defaultp> fmat2;
+	typedef mat<2, 2, f32, defaultp> fmat2;
 
 
 	/// Single-precision floating-point 3x3 matrix.
 	/// Single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, defaultp> fmat3;
+	typedef mat<3, 3, f32, defaultp> fmat3;
 
 
 	/// Single-precision floating-point 4x4 matrix.
 	/// Single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, defaultp> fmat4;
+	typedef mat<4, 4, f32, defaultp> fmat4;
 
 
 
 
 	/// Single-precision floating-point 1x1 matrix.
 	/// Single-precision floating-point 1x1 matrix.
@@ -692,39 +692,39 @@ namespace glm
 
 
 	/// Single-precision floating-point 2x2 matrix.
 	/// Single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, defaultp> fmat2x2;
+	typedef mat<2, 2, f32, defaultp> fmat2x2;
 
 
 	/// Single-precision floating-point 2x3 matrix.
 	/// Single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, defaultp> fmat2x3;
+	typedef mat<2, 3, f32, defaultp> fmat2x3;
 
 
 	/// Single-precision floating-point 2x4 matrix.
 	/// Single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, defaultp> fmat2x4;
+	typedef mat<2, 4, f32, defaultp> fmat2x4;
 
 
 	/// Single-precision floating-point 3x2 matrix.
 	/// Single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, defaultp> fmat3x2;
+	typedef mat<3, 2, f32, defaultp> fmat3x2;
 
 
 	/// Single-precision floating-point 3x3 matrix.
 	/// Single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, defaultp> fmat3x3;
+	typedef mat<3, 3, f32, defaultp> fmat3x3;
 
 
 	/// Single-precision floating-point 3x4 matrix.
 	/// Single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, defaultp> fmat3x4;
+	typedef mat<3, 4, f32, defaultp> fmat3x4;
 
 
 	/// Single-precision floating-point 4x2 matrix.
 	/// Single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, defaultp> fmat4x2;
+	typedef mat<4, 2, f32, defaultp> fmat4x2;
 
 
 	/// Single-precision floating-point 4x3 matrix.
 	/// Single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, defaultp> fmat4x3;
+	typedef mat<4, 3, f32, defaultp> fmat4x3;
 
 
 	/// Single-precision floating-point 4x4 matrix.
 	/// Single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, defaultp> fmat4x4;
+	typedef mat<4, 4, f32, defaultp> fmat4x4;
 
 
 
 
 	/// Single-precision floating-point 1x1 matrix.
 	/// Single-precision floating-point 1x1 matrix.
@@ -733,15 +733,15 @@ namespace glm
 
 
 	/// Single-precision floating-point 2x2 matrix.
 	/// Single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, defaultp> f32mat2;
+	typedef mat<2, 2, f32, defaultp> f32mat2;
 
 
 	/// Single-precision floating-point 3x3 matrix.
 	/// Single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, defaultp> f32mat3;
+	typedef mat<3, 3, f32, defaultp> f32mat3;
 
 
 	/// Single-precision floating-point 4x4 matrix.
 	/// Single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, defaultp> f32mat4;
+	typedef mat<4, 4, f32, defaultp> f32mat4;
 
 
 
 
 	/// Single-precision floating-point 1x1 matrix.
 	/// Single-precision floating-point 1x1 matrix.
@@ -750,39 +750,39 @@ namespace glm
 
 
 	/// Single-precision floating-point 2x2 matrix.
 	/// Single-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f32, defaultp> f32mat2x2;
+	typedef mat<2, 2, f32, defaultp> f32mat2x2;
 
 
 	/// Single-precision floating-point 2x3 matrix.
 	/// Single-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f32, defaultp> f32mat2x3;
+	typedef mat<2, 3, f32, defaultp> f32mat2x3;
 
 
 	/// Single-precision floating-point 2x4 matrix.
 	/// Single-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f32, defaultp> f32mat2x4;
+	typedef mat<2, 4, f32, defaultp> f32mat2x4;
 
 
 	/// Single-precision floating-point 3x2 matrix.
 	/// Single-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f32, defaultp> f32mat3x2;
+	typedef mat<3, 2, f32, defaultp> f32mat3x2;
 
 
 	/// Single-precision floating-point 3x3 matrix.
 	/// Single-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f32, defaultp> f32mat3x3;
+	typedef mat<3, 3, f32, defaultp> f32mat3x3;
 
 
 	/// Single-precision floating-point 3x4 matrix.
 	/// Single-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f32, defaultp> f32mat3x4;
+	typedef mat<3, 4, f32, defaultp> f32mat3x4;
 
 
 	/// Single-precision floating-point 4x2 matrix.
 	/// Single-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f32, defaultp> f32mat4x2;
+	typedef mat<4, 2, f32, defaultp> f32mat4x2;
 
 
 	/// Single-precision floating-point 4x3 matrix.
 	/// Single-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f32, defaultp> f32mat4x3;
+	typedef mat<4, 3, f32, defaultp> f32mat4x3;
 
 
 	/// Single-precision floating-point 4x4 matrix.
 	/// Single-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f32, defaultp> f32mat4x4;
+	typedef mat<4, 4, f32, defaultp> f32mat4x4;
 
 
 
 
 	/// Double-precision floating-point 1x1 matrix.
 	/// Double-precision floating-point 1x1 matrix.
@@ -791,15 +791,15 @@ namespace glm
 
 
 	/// Double-precision floating-point 2x2 matrix.
 	/// Double-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f64, defaultp> f64mat2;
+	typedef mat<2, 2, f64, defaultp> f64mat2;
 
 
 	/// Double-precision floating-point 3x3 matrix.
 	/// Double-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f64, defaultp> f64mat3;
+	typedef mat<3, 3, f64, defaultp> f64mat3;
 
 
 	/// Double-precision floating-point 4x4 matrix.
 	/// Double-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f64, defaultp> f64mat4;
+	typedef mat<4, 4, f64, defaultp> f64mat4;
 
 
 
 
 	/// Double-precision floating-point 1x1 matrix.
 	/// Double-precision floating-point 1x1 matrix.
@@ -808,39 +808,39 @@ namespace glm
 
 
 	/// Double-precision floating-point 2x2 matrix.
 	/// Double-precision floating-point 2x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x2<f64, defaultp> f64mat2x2;
+	typedef mat<2, 2, f64, defaultp> f64mat2x2;
 
 
 	/// Double-precision floating-point 2x3 matrix.
 	/// Double-precision floating-point 2x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x3<f64, defaultp> f64mat2x3;
+	typedef mat<2, 3, f64, defaultp> f64mat2x3;
 
 
 	/// Double-precision floating-point 2x4 matrix.
 	/// Double-precision floating-point 2x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat2x4<f64, defaultp> f64mat2x4;
+	typedef mat<2, 4, f64, defaultp> f64mat2x4;
 
 
 	/// Double-precision floating-point 3x2 matrix.
 	/// Double-precision floating-point 3x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x2<f64, defaultp> f64mat3x2;
+	typedef mat<3, 2, f64, defaultp> f64mat3x2;
 
 
 	/// Double-precision floating-point 3x3 matrix.
 	/// Double-precision floating-point 3x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x3<f64, defaultp> f64mat3x3;
+	typedef mat<3, 3, f64, defaultp> f64mat3x3;
 
 
 	/// Double-precision floating-point 3x4 matrix.
 	/// Double-precision floating-point 3x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat3x4<f64, defaultp> f64mat3x4;
+	typedef mat<3, 4, f64, defaultp> f64mat3x4;
 
 
 	/// Double-precision floating-point 4x2 matrix.
 	/// Double-precision floating-point 4x2 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x2<f64, defaultp> f64mat4x2;
+	typedef mat<4, 2, f64, defaultp> f64mat4x2;
 
 
 	/// Double-precision floating-point 4x3 matrix.
 	/// Double-precision floating-point 4x3 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x3<f64, defaultp> f64mat4x3;
+	typedef mat<4, 3, f64, defaultp> f64mat4x3;
 
 
 	/// Double-precision floating-point 4x4 matrix.
 	/// Double-precision floating-point 4x4 matrix.
 	/// @see gtc_type_precision
 	/// @see gtc_type_precision
-	typedef tmat4x4<f64, defaultp> f64mat4x4;
+	typedef mat<4, 4, f64, defaultp> f64mat4x4;
 
 
 
 
 	//////////////////////////
 	//////////////////////////

+ 12 - 12
glm/gtc/type_ptr.hpp

@@ -80,62 +80,62 @@ namespace glm
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat2x2<T, defaultp> make_mat2x2(T const * const ptr);
+	GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2x2(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat2x3<T, defaultp> make_mat2x3(T const * const ptr);
+	GLM_FUNC_DECL mat<2, 3, T, defaultp> make_mat2x3(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat2x4<T, defaultp> make_mat2x4(T const * const ptr);
+	GLM_FUNC_DECL mat<2, 4, T, defaultp> make_mat2x4(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat3x2<T, defaultp> make_mat3x2(T const * const ptr);
+	GLM_FUNC_DECL mat<3, 2, T, defaultp> make_mat3x2(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat3x3<T, defaultp> make_mat3x3(T const * const ptr);
+	GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3x3(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat3x4<T, defaultp> make_mat3x4(T const * const ptr);
+	GLM_FUNC_DECL mat<3, 4, T, defaultp> make_mat3x4(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat4x2<T, defaultp> make_mat4x2(T const * const ptr);
+	GLM_FUNC_DECL mat<4, 2, T, defaultp> make_mat4x2(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat4x3<T, defaultp> make_mat4x3(T const * const ptr);
+	GLM_FUNC_DECL mat<4, 3, T, defaultp> make_mat4x3(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> make_mat4x4(T const * const ptr);
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4x4(T const * const ptr);
 	
 	
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat2x2<T, defaultp> make_mat2(T const * const ptr);
+	GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2(T const * const ptr);
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat3x3<T, defaultp> make_mat3(T const * const ptr);
+	GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3(T const * const ptr);
 		
 		
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T>
 	template<typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> make_mat4(T const * const ptr);
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4(T const * const ptr);
 
 
 	/// Build a quaternion from a pointer.
 	/// Build a quaternion from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr

+ 48 - 48
glm/gtc/type_ptr.inl

@@ -79,7 +79,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat2x2<T, P> const & mat
+		mat<2, 2, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -90,7 +90,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(
 	(
-		tmat2x2<T, P> & mat
+		mat<2, 2, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -101,7 +101,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat3x3<T, P> const & mat
+		mat<3, 3, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -112,7 +112,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(
 	(
-		tmat3x3<T, P> & mat
+		mat<3, 3, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -123,7 +123,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat4x4<T, P> const & mat
+		mat<4, 4, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -134,7 +134,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(
 	(
-		tmat4x4<T, P> & mat
+		mat<4, 4, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -145,7 +145,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat2x3<T, P> const & mat
+		mat<2, 3, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -156,7 +156,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(
 	(
-		tmat2x3<T, P> & mat
+		mat<2, 3, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -167,7 +167,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat3x2<T, P> const & mat
+		mat<3, 2, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -178,7 +178,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(
 	(
-		tmat3x2<T, P> & mat
+		mat<3, 2, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -189,7 +189,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat2x4<T, P> const & mat
+		mat<2, 4, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -200,7 +200,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(
 	(
-		tmat2x4<T, P> & mat
+		mat<2, 4, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -211,7 +211,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat4x2<T, P> const & mat
+		mat<4, 2, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -222,7 +222,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(	
 	(	
-		tmat4x2<T, P> & mat
+		mat<4, 2, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -233,7 +233,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat3x4<T, P> const & mat
+		mat<3, 4, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -244,7 +244,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T * value_ptr
 	GLM_FUNC_QUALIFIER T * value_ptr
 	(
 	(
-		tmat3x4<T, P> & mat
+		mat<3, 4, T, P> & mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -255,7 +255,7 @@ namespace glm
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	GLM_FUNC_QUALIFIER T const * value_ptr
 	(
 	(
-		tmat4x3<T, P> const & mat
+		mat<4, 3, T, P> const& mat
 	)
 	)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
@@ -264,7 +264,7 @@ namespace glm
 	/// Return the address to the data of the matrix input.
 	/// Return the address to the data of the matrix input.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_QUALIFIER T * value_ptr(tmat4x3<T, P> & mat)
+	GLM_FUNC_QUALIFIER T * value_ptr(mat<4, 3, T, P> & mat)
 	{
 	{
 		return &(mat[0].x);
 		return &(mat[0].x);
 	}
 	}
@@ -324,97 +324,97 @@ namespace glm
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> make_mat2x2(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, defaultp> make_mat2x2(T const * const ptr)
 	{
 	{
-		tmat2x2<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat2x2<T, defaultp>));
+		mat<2, 2, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<2, 2, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat2x3<T, defaultp> make_mat2x3(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<2, 3, T, defaultp> make_mat2x3(T const * const ptr)
 	{
 	{
-		tmat2x3<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat2x3<T, defaultp>));
+		mat<2, 3, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<2, 3, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat2x4<T, defaultp> make_mat2x4(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, defaultp> make_mat2x4(T const * const ptr)
 	{
 	{
-		tmat2x4<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat2x4<T, defaultp>));
+		mat<2, 4, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<2, 4, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	/// Build a matrix from a pointer.
 	/// Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat3x2<T, defaultp> make_mat3x2(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<3, 2, T, defaultp> make_mat3x2(T const * const ptr)
 	{
 	{
-		tmat3x2<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat3x2<T, defaultp>));
+		mat<3, 2, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<3, 2, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> make_mat3x3(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, defaultp> make_mat3x3(T const * const ptr)
 	{
 	{
-		tmat3x3<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat3x3<T, defaultp>));
+		mat<3, 3, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<3, 3, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat3x4<T, defaultp> make_mat3x4(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, defaultp> make_mat3x4(T const * const ptr)
 	{
 	{
-		tmat3x4<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat3x4<T, defaultp>));
+		mat<3, 4, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<3, 4, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x2<T, defaultp> make_mat4x2(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<4, 2, T, defaultp> make_mat4x2(T const * const ptr)
 	{
 	{
-		tmat4x2<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat4x2<T, defaultp>));
+		mat<4, 2, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<4, 2, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x3<T, defaultp> make_mat4x3(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<4, 3, T, defaultp> make_mat4x3(T const * const ptr)
 	{
 	{
-		tmat4x3<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat4x3<T, defaultp>));
+		mat<4, 3, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<4, 3, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> make_mat4x4(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> make_mat4x4(T const * const ptr)
 	{
 	{
-		tmat4x4<T, defaultp> Result;
-		memcpy(value_ptr(Result), ptr, sizeof(tmat4x4<T, defaultp>));
+		mat<4, 4, T, defaultp> Result;
+		memcpy(value_ptr(Result), ptr, sizeof(mat<4, 4, T, defaultp>));
 		return Result;
 		return Result;
 	}
 	}
 
 
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> make_mat2(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, defaultp> make_mat2(T const * const ptr)
 	{
 	{
 		return make_mat2x2(ptr);
 		return make_mat2x2(ptr);
 	}
 	}
@@ -422,7 +422,7 @@ namespace glm
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> make_mat3(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, defaultp> make_mat3(T const * const ptr)
 	{
 	{
 		return make_mat3x3(ptr);
 		return make_mat3x3(ptr);
 	}
 	}
@@ -430,7 +430,7 @@ namespace glm
 	//! Build a matrix from a pointer.
 	//! Build a matrix from a pointer.
 	/// @see gtc_type_ptr
 	/// @see gtc_type_ptr
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> make_mat4(T const * const ptr)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> make_mat4(T const * const ptr)
 	{
 	{
 		return make_mat4x4(ptr);
 		return make_mat4x4(ptr);
 	}
 	}

+ 1 - 1
glm/gtx/color_space.hpp

@@ -43,7 +43,7 @@ namespace glm
 	/// Build a saturation matrix.
 	/// Build a saturation matrix.
 	/// @see gtx_color_space
 	/// @see gtx_color_space
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> saturation(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> saturation(
 		T const s);
 		T const s);
 
 
 	/// Modify the saturation of a color.
 	/// Modify the saturation of a color.

+ 2 - 2
glm/gtx/color_space.inl

@@ -101,7 +101,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> saturation(T const s)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> saturation(T const s)
 	{
 	{
 		vec<3, T, defaultp> rgbw = vec<3, T, defaultp>(T(0.2126), T(0.7152), T(0.0722));
 		vec<3, T, defaultp> rgbw = vec<3, T, defaultp>(T(0.2126), T(0.7152), T(0.0722));
 
 
@@ -109,7 +109,7 @@ namespace glm
 		T col1 = (T(1) - s) * rgbw.g;
 		T col1 = (T(1) - s) * rgbw.g;
 		T col2 = (T(1) - s) * rgbw.b;
 		T col2 = (T(1) - s) * rgbw.b;
 
 
-		tmat4x4<T, defaultp> result(T(1));
+		mat<4, 4, T, defaultp> result(T(1));
 		result[0][0] = col0 + s;
 		result[0][0] = col0 + s;
 		result[0][1] = col0;
 		result[0][1] = col0;
 		result[0][2] = col0;
 		result[0][2] = col0;

+ 36 - 36
glm/gtx/compatibility.hpp

@@ -69,15 +69,15 @@ namespace glm
 	typedef vec<4, bool, highp>			bool4;			//!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension)
 	typedef vec<4, bool, highp>			bool4;			//!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension)
 
 
 	typedef bool						bool1x1;		//!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
 	typedef bool						bool1x1;		//!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
-	typedef tmat2x2<bool, highp>		bool2x2;		//!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x3<bool, highp>		bool2x3;		//!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x4<bool, highp>		bool2x4;		//!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x2<bool, highp>		bool3x2;		//!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x3<bool, highp>		bool3x3;		//!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x4<bool, highp>		bool3x4;		//!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x2<bool, highp>		bool4x2;		//!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x3<bool, highp>		bool4x3;		//!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x4<bool, highp>		bool4x4;		//!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 2, bool, highp>		bool2x2;		//!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 3, bool, highp>		bool2x3;		//!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 4, bool, highp>		bool2x4;		//!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 2, bool, highp>		bool3x2;		//!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 3, bool, highp>		bool3x3;		//!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 4, bool, highp>		bool3x4;		//!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 2, bool, highp>		bool4x2;		//!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 3, bool, highp>		bool4x3;		//!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 4, bool, highp>		bool4x4;		//!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
 
 
 	typedef int							int1;			//!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension)
 	typedef int							int1;			//!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension)
 	typedef vec<2, int, highp>			int2;			//!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension)
 	typedef vec<2, int, highp>			int2;			//!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension)
@@ -85,15 +85,15 @@ namespace glm
 	typedef vec<4, int, highp>			int4;			//!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension)
 	typedef vec<4, int, highp>			int4;			//!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension)
 
 
 	typedef int							int1x1;			//!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)
 	typedef int							int1x1;			//!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)
-	typedef tmat2x2<int, highp>		int2x2;			//!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x3<int, highp>		int2x3;			//!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x4<int, highp>		int2x4;			//!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x2<int, highp>		int3x2;			//!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x3<int, highp>		int3x3;			//!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x4<int, highp>		int3x4;			//!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x2<int, highp>		int4x2;			//!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x3<int, highp>		int4x3;			//!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x4<int, highp>		int4x4;			//!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 2, int, highp>		int2x2;			//!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 3, int, highp>		int2x3;			//!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 4, int, highp>		int2x4;			//!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 2, int, highp>		int3x2;			//!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 3, int, highp>		int3x3;			//!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 4, int, highp>		int3x4;			//!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 2, int, highp>		int4x2;			//!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 3, int, highp>		int4x3;			//!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 4, int, highp>		int4x4;			//!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
 
 
 	typedef float						float1;			//!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
 	typedef float						float1;			//!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
 	typedef vec<2, float, highp>		float2;			//!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
 	typedef vec<2, float, highp>		float2;			//!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
@@ -101,15 +101,15 @@ namespace glm
 	typedef vec<4, float, highp>		float4;			//!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
 	typedef vec<4, float, highp>		float4;			//!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
 
 
 	typedef float						float1x1;		//!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
 	typedef float						float1x1;		//!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
-	typedef tmat2x2<float, highp>		float2x2;		//!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x3<float, highp>		float2x3;		//!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x4<float, highp>		float2x4;		//!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x2<float, highp>		float3x2;		//!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x3<float, highp>		float3x3;		//!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x4<float, highp>		float3x4;		//!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x2<float, highp>		float4x2;		//!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x3<float, highp>		float4x3;		//!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x4<float, highp>		float4x4;		//!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 2, float, highp>		float2x2;		//!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 3, float, highp>		float2x3;		//!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 4, float, highp>		float2x4;		//!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 2, float, highp>		float3x2;		//!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 3, float, highp>		float3x3;		//!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 4, float, highp>		float3x4;		//!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 2, float, highp>		float4x2;		//!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 3, float, highp>		float4x3;		//!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 4, float, highp>		float4x4;		//!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
 
 
 	typedef double						double1;		//!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
 	typedef double						double1;		//!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
 	typedef vec<2, double, highp>		double2;		//!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
 	typedef vec<2, double, highp>		double2;		//!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
@@ -117,15 +117,15 @@ namespace glm
 	typedef vec<4, double, highp>		double4;		//!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
 	typedef vec<4, double, highp>		double4;		//!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
 
 
 	typedef double						double1x1;		//!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
 	typedef double						double1x1;		//!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
-	typedef tmat2x2<double, highp>		double2x2;		//!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x3<double, highp>		double2x3;		//!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat2x4<double, highp>		double2x4;		//!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x2<double, highp>		double3x2;		//!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x3<double, highp>		double3x3;		//!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat3x4<double, highp>		double3x4;		//!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x2<double, highp>		double4x2;		//!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x3<double, highp>		double4x3;		//!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
-	typedef tmat4x4<double, highp>		double4x4;		//!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 2, double, highp>		double2x2;		//!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 3, double, highp>		double2x3;		//!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<2, 4, double, highp>		double2x4;		//!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 2, double, highp>		double3x2;		//!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 3, double, highp>		double3x3;		//!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<3, 4, double, highp>		double3x4;		//!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 2, double, highp>		double4x2;		//!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 3, double, highp>		double4x3;		//!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+	typedef mat<4, 4, double, highp>		double4x4;		//!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
 
 
 	/// @}
 	/// @}
 }//namespace glm
 }//namespace glm

+ 6 - 6
glm/gtx/dual_quaternion.hpp

@@ -73,8 +73,8 @@ namespace glm
 		template <typename U, precision Q>
 		template <typename U, precision Q>
 		GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tdualquat<U, Q> const & q);
 		GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tdualquat<U, Q> const & q);
 
 
-		GLM_FUNC_DECL GLM_EXPLICIT tdualquat(tmat2x4<T, P> const & holder_mat);
-		GLM_FUNC_DECL GLM_EXPLICIT tdualquat(tmat3x4<T, P> const & aug_mat);
+		GLM_FUNC_DECL GLM_EXPLICIT tdualquat(mat<2, 4, T, P> const & holder_mat);
+		GLM_FUNC_DECL GLM_EXPLICIT tdualquat(mat<3, 4, T, P> const & aug_mat);
 
 
 		// -- Unary arithmetic operators --
 		// -- Unary arithmetic operators --
 
 
@@ -155,25 +155,25 @@ namespace glm
 	///
 	///
 	/// @see gtx_dual_quaternion
 	/// @see gtx_dual_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> mat2x4_cast(tdualquat<T, P> const & x);
+	GLM_FUNC_DECL mat<2, 4, T, P> mat2x4_cast(tdualquat<T, P> const & x);
 
 
 	/// Converts a quaternion to a 3 * 4 matrix.
 	/// Converts a quaternion to a 3 * 4 matrix.
 	///
 	///
 	/// @see gtx_dual_quaternion
 	/// @see gtx_dual_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> mat3x4_cast(tdualquat<T, P> const & x);
+	GLM_FUNC_DECL mat<3, 4, T, P> mat3x4_cast(tdualquat<T, P> const & x);
 
 
 	/// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.
 	/// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.
 	///
 	///
 	/// @see gtx_dual_quaternion
 	/// @see gtx_dual_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(tmat2x4<T, P> const & x);
+	GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(mat<2, 4, T, P> const & x);
 
 
 	/// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.
 	/// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.
 	///
 	///
 	/// @see gtx_dual_quaternion
 	/// @see gtx_dual_quaternion
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(tmat3x4<T, P> const & x);
+	GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(mat<3, 4, T, P> const & x);
 
 
 
 
 	/// Dual-quaternion of low single-precision floating-point numbers.
 	/// Dual-quaternion of low single-precision floating-point numbers.

+ 8 - 8
glm/gtx/dual_quaternion.inl

@@ -84,13 +84,13 @@ namespace glm
 	{}
 	{}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tmat2x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(mat<2, 4, T, P> const & m)
 	{
 	{
 		*this = dualquat_cast(m);
 		*this = dualquat_cast(m);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tmat3x4<T, P> const & m)
+	GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(mat<3, 4, T, P> const & m)
 	{
 	{
 		*this = dualquat_cast(m);
 		*this = dualquat_cast(m);
 	}
 	}
@@ -249,13 +249,13 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> mat2x4_cast(tdualquat<T, P> const & x)
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat2x4_cast(tdualquat<T, P> const & x)
 	{
 	{
-		return tmat2x4<T, P>( x[0].x, x[0].y, x[0].z, x[0].w, x[1].x, x[1].y, x[1].z, x[1].w );
+		return mat<2, 4, T, P>( x[0].x, x[0].y, x[0].z, x[0].w, x[1].x, x[1].y, x[1].z, x[1].w );
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> mat3x4_cast(tdualquat<T, P> const & x)
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat3x4_cast(tdualquat<T, P> const & x)
 	{
 	{
 		tquat<T, P> r = x.real / length2(x.real);
 		tquat<T, P> r = x.real / length2(x.real);
 		
 		
@@ -287,11 +287,11 @@ namespace glm
 			rr.w + rr.z - rr.x - rr.y,
 			rr.w + rr.z - rr.x - rr.y,
 			-(x.dual.w * r.z + x.dual.x * r.y - x.dual.y * r.x - x.dual.z * r.w));
 			-(x.dual.w * r.z + x.dual.x * r.y - x.dual.y * r.x - x.dual.z * r.w));
 		
 		
-		return tmat3x4<T, P>(a, b, c);
+		return mat<3, 4, T, P>(a, b, c);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P> dualquat_cast(tmat2x4<T, P> const & x)
+	GLM_FUNC_QUALIFIER tdualquat<T, P> dualquat_cast(mat<2, 4, T, P> const & x)
 	{
 	{
 		return tdualquat<T, P>(
 		return tdualquat<T, P>(
 			tquat<T, P>( x[0].w, x[0].x, x[0].y, x[0].z ),
 			tquat<T, P>( x[0].w, x[0].x, x[0].y, x[0].z ),
@@ -299,7 +299,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tdualquat<T, P> dualquat_cast(tmat3x4<T, P> const & x)
+	GLM_FUNC_QUALIFIER tdualquat<T, P> dualquat_cast(mat<3, 4, T, P> const & x)
 	{
 	{
 		tquat<T, P> real(uninitialize);
 		tquat<T, P> real(uninitialize);
 		
 		

+ 17 - 17
glm/gtx/euler_angles.hpp

@@ -31,67 +31,67 @@ namespace glm
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleX(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleX(
 		T const & angleX);
 		T const & angleX);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleY(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleY(
 		T const & angleY);
 		T const & angleY);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZ(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZ(
 		T const & angleZ);
 		T const & angleZ);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXY(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXY(
 		T const & angleX,
 		T const & angleX,
 		T const & angleY);
 		T const & angleY);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYX(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYX(
 		T const & angleY,
 		T const & angleY,
 		T const & angleX);
 		T const & angleX);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXZ(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZ(
 		T const & angleX,
 		T const & angleX,
 		T const & angleZ);
 		T const & angleZ);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZX(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZX(
 		T const & angle,
 		T const & angle,
 		T const & angleX);
 		T const & angleX);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYZ(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZ(
 		T const & angleY,
 		T const & angleY,
 		T const & angleZ);
 		T const & angleZ);
 
 
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZY(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZY(
 		T const & angleZ,
 		T const & angleZ,
 		T const & angleY);
 		T const & angleY);
 
 
     /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z).
     /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z).
     /// @see gtx_euler_angles
     /// @see gtx_euler_angles
     template <typename T>
     template <typename T>
-    GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXYZ(
+    GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYZ(
         T const & t1,
         T const & t1,
         T const & t2,
         T const & t2,
         T const & t3);
         T const & t3);
@@ -99,7 +99,7 @@ namespace glm
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYXZ(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXZ(
 		T const & yaw,
 		T const & yaw,
 		T const & pitch,
 		T const & pitch,
 		T const & roll);
 		T const & roll);
@@ -107,7 +107,7 @@ namespace glm
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat4x4<T, defaultp> yawPitchRoll(
+	GLM_FUNC_DECL mat<4, 4, T, defaultp> yawPitchRoll(
 		T const & yaw,
 		T const & yaw,
 		T const & pitch,
 		T const & pitch,
 		T const & roll);
 		T const & roll);
@@ -115,27 +115,27 @@ namespace glm
 	/// Creates a 2D 2 * 2 rotation matrix from an euler angle.
 	/// Creates a 2D 2 * 2 rotation matrix from an euler angle.
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat2x2<T, defaultp> orientate2(T const & angle);
+	GLM_FUNC_DECL mat<2, 2, T, defaultp> orientate2(T const & angle);
 
 
 	/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
 	/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_DECL tmat3x3<T, defaultp> orientate3(T const & angle);
+	GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const & angle);
 
 
 	/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). 
 	/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). 
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> orientate3(vec<3, T, P> const & angles);
+	GLM_FUNC_DECL mat<3, 3, T, P> orientate3(vec<3, T, P> const & angles);
 		
 		
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
 	/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
 	/// @see gtx_euler_angles
 	/// @see gtx_euler_angles
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> orientate4(vec<3, T, P> const & angles);
+	GLM_FUNC_DECL mat<4, 4, T, P> orientate4(vec<3, T, P> const & angles);
 
 
     /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M
     /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M
     /// @see gtx_euler_angles
     /// @see gtx_euler_angles
     template <typename T>
     template <typename T>
-    GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4<T, defaultp> const & M,
+    GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const & M,
                                             T & t1,
                                             T & t1,
                                             T & t2,
                                             T & t2,
                                             T & t3);
                                             T & t3);

+ 28 - 28
glm/gtx/euler_angles.inl

@@ -6,7 +6,7 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleX
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleX
 	(
 	(
 		T const & angleX
 		T const & angleX
 	)
 	)
@@ -14,7 +14,7 @@ namespace glm
 		T cosX = glm::cos(angleX);
 		T cosX = glm::cos(angleX);
 		T sinX = glm::sin(angleX);
 		T sinX = glm::sin(angleX);
 	
 	
-		return tmat4x4<T, defaultp>(
+		return mat<4, 4, T, defaultp>(
 			T(1), T(0), T(0), T(0),
 			T(1), T(0), T(0), T(0),
 			T(0), cosX, sinX, T(0),
 			T(0), cosX, sinX, T(0),
 			T(0),-sinX, cosX, T(0),
 			T(0),-sinX, cosX, T(0),
@@ -22,7 +22,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleY
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleY
 	(
 	(
 		T const & angleY
 		T const & angleY
 	)
 	)
@@ -30,7 +30,7 @@ namespace glm
 		T cosY = glm::cos(angleY);
 		T cosY = glm::cos(angleY);
 		T sinY = glm::sin(angleY);
 		T sinY = glm::sin(angleY);
 
 
-		return tmat4x4<T, defaultp>(
+		return mat<4, 4, T, defaultp>(
 			cosY,	T(0),	-sinY,	T(0),
 			cosY,	T(0),	-sinY,	T(0),
 			T(0),	T(1),	T(0),	T(0),
 			T(0),	T(1),	T(0),	T(0),
 			sinY,	T(0),	cosY,	T(0),
 			sinY,	T(0),	cosY,	T(0),
@@ -38,7 +38,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZ
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleZ
 	(
 	(
 		T const & angleZ
 		T const & angleZ
 	)
 	)
@@ -46,7 +46,7 @@ namespace glm
 		T cosZ = glm::cos(angleZ);
 		T cosZ = glm::cos(angleZ);
 		T sinZ = glm::sin(angleZ);
 		T sinZ = glm::sin(angleZ);
 
 
-		return tmat4x4<T, defaultp>(
+		return mat<4, 4, T, defaultp>(
 			cosZ,	sinZ,	T(0), T(0),
 			cosZ,	sinZ,	T(0), T(0),
 			-sinZ,	cosZ,	T(0), T(0),
 			-sinZ,	cosZ,	T(0), T(0),
 			T(0),	T(0),	T(1), T(0),
 			T(0),	T(0),	T(1), T(0),
@@ -54,7 +54,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleXY
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXY
 	(
 	(
 		T const & angleX,
 		T const & angleX,
 		T const & angleY
 		T const & angleY
@@ -65,7 +65,7 @@ namespace glm
 		T cosY = glm::cos(angleY);
 		T cosY = glm::cos(angleY);
 		T sinY = glm::sin(angleY);
 		T sinY = glm::sin(angleY);
 
 
-		return tmat4x4<T, defaultp>(
+		return mat<4, 4, T, defaultp>(
 			cosY,   -sinX * -sinY,  cosX * -sinY,   T(0),
 			cosY,   -sinX * -sinY,  cosX * -sinY,   T(0),
 			T(0),   cosX,           sinX,           T(0),
 			T(0),   cosX,           sinX,           T(0),
 			sinY,   -sinX * cosY,   cosX * cosY,    T(0),
 			sinY,   -sinX * cosY,   cosX * cosY,    T(0),
@@ -73,7 +73,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleYX
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYX
 	(
 	(
 		T const & angleY,
 		T const & angleY,
 		T const & angleX
 		T const & angleX
@@ -84,7 +84,7 @@ namespace glm
 		T cosY = glm::cos(angleY);
 		T cosY = glm::cos(angleY);
 		T sinY = glm::sin(angleY);
 		T sinY = glm::sin(angleY);
 
 
-		return tmat4x4<T, defaultp>(
+		return mat<4, 4, T, defaultp>(
 			cosY,          0,      -sinY,    T(0),
 			cosY,          0,      -sinY,    T(0),
 			sinY * sinX,  cosX, cosY * sinX, T(0),
 			sinY * sinX,  cosX, cosY * sinX, T(0),
 			sinY * cosX, -sinX, cosY * cosX, T(0),
 			sinY * cosX, -sinX, cosY * cosX, T(0),
@@ -92,7 +92,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleXZ
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXZ
 	(
 	(
 		T const & angleX,
 		T const & angleX,
 		T const & angleZ
 		T const & angleZ
@@ -102,7 +102,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZX
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleZX
 	(
 	(
 		T const & angleZ,
 		T const & angleZ,
 		T const & angleX
 		T const & angleX
@@ -112,7 +112,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleYZ
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYZ
 	(
 	(
 		T const & angleY,
 		T const & angleY,
 		T const & angleZ
 		T const & angleZ
@@ -122,7 +122,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZY
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleZY
 	(
 	(
 		T const & angleZ,
 		T const & angleZ,
 		T const & angleY
 		T const & angleY
@@ -132,7 +132,7 @@ namespace glm
 	}
 	}
     
     
     template <typename T>
     template <typename T>
-    GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleXYZ
+    GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXYZ
     (
     (
      T const & t1,
      T const & t1,
      T const & t2,
      T const & t2,
@@ -146,7 +146,7 @@ namespace glm
         T s2 = glm::sin(-t2);
         T s2 = glm::sin(-t2);
         T s3 = glm::sin(-t3);
         T s3 = glm::sin(-t3);
         
         
-        tmat4x4<T, defaultp> Result;
+        mat<4, 4, T, defaultp> Result;
         Result[0][0] = c2 * c3;
         Result[0][0] = c2 * c3;
         Result[0][1] =-c1 * s3 + s1 * s2 * c3;
         Result[0][1] =-c1 * s3 + s1 * s2 * c3;
         Result[0][2] = s1 * s3 + c1 * s2 * c3;
         Result[0][2] = s1 * s3 + c1 * s2 * c3;
@@ -167,7 +167,7 @@ namespace glm
     }
     }
     
     
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleYXZ
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYXZ
 	(
 	(
 		T const & yaw,
 		T const & yaw,
 		T const & pitch,
 		T const & pitch,
@@ -181,7 +181,7 @@ namespace glm
 		T tmp_cb = glm::cos(roll);
 		T tmp_cb = glm::cos(roll);
 		T tmp_sb = glm::sin(roll);
 		T tmp_sb = glm::sin(roll);
 
 
-		tmat4x4<T, defaultp> Result;
+		mat<4, 4, T, defaultp> Result;
 		Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
 		Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
 		Result[0][1] = tmp_sb * tmp_cp;
 		Result[0][1] = tmp_sb * tmp_cp;
 		Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
 		Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
@@ -202,7 +202,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> yawPitchRoll
+	GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> yawPitchRoll
 	(
 	(
 		T const & yaw,
 		T const & yaw,
 		T const & pitch,
 		T const & pitch,
@@ -216,7 +216,7 @@ namespace glm
 		T tmp_cb = glm::cos(roll);
 		T tmp_cb = glm::cos(roll);
 		T tmp_sb = glm::sin(roll);
 		T tmp_sb = glm::sin(roll);
 
 
-		tmat4x4<T, defaultp> Result;
+		mat<4, 4, T, defaultp> Result;
 		Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
 		Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
 		Result[0][1] = tmp_sb * tmp_cp;
 		Result[0][1] = tmp_sb * tmp_cp;
 		Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
 		Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
@@ -237,7 +237,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> orientate2
+	GLM_FUNC_QUALIFIER mat<2, 2, T, defaultp> orientate2
 	(
 	(
 		T const & angle
 		T const & angle
 	)
 	)
@@ -245,7 +245,7 @@ namespace glm
 		T c = glm::cos(angle);
 		T c = glm::cos(angle);
 		T s = glm::sin(angle);
 		T s = glm::sin(angle);
 
 
-		tmat2x2<T, defaultp> Result;
+		mat<2, 2, T, defaultp> Result;
 		Result[0][0] = c;
 		Result[0][0] = c;
 		Result[0][1] = s;
 		Result[0][1] = s;
 		Result[1][0] = -s;
 		Result[1][0] = -s;
@@ -254,7 +254,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T>
 	template <typename T>
-	GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> orientate3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, defaultp> orientate3
 	(
 	(
 		T const & angle
 		T const & angle
 	)
 	)
@@ -262,7 +262,7 @@ namespace glm
 		T c = glm::cos(angle);
 		T c = glm::cos(angle);
 		T s = glm::sin(angle);
 		T s = glm::sin(angle);
 
 
-		tmat3x3<T, defaultp> Result;
+		mat<3, 3, T, defaultp> Result;
 		Result[0][0] = c;
 		Result[0][0] = c;
 		Result[0][1] = s;
 		Result[0][1] = s;
 		Result[0][2] = 0.0f;
 		Result[0][2] = 0.0f;
@@ -276,16 +276,16 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> orientate3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> orientate3
 	(
 	(
 		vec<3, T, P> const & angles
 		vec<3, T, P> const & angles
 	)
 	)
 	{
 	{
-		return tmat3x3<T, P>(yawPitchRoll(angles.z, angles.x, angles.y));
+		return mat<3, 3, T, P>(yawPitchRoll(angles.z, angles.x, angles.y));
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> orientate4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> orientate4
 	(
 	(
 		vec<3, T, P> const & angles
 		vec<3, T, P> const & angles
 	)
 	)
@@ -294,7 +294,7 @@ namespace glm
 	}
 	}
     
     
     template <typename T>
     template <typename T>
-    GLM_FUNC_DECL void extractEulerAngleXYZ(tmat4x4<T, defaultp> const & M,
+    GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const & M,
                                             T & t1,
                                             T & t1,
                                             T & t2,
                                             T & t2,
                                             T & t3)
                                             T & t3)

+ 18 - 18
glm/gtx/hash.hpp

@@ -81,57 +81,57 @@ namespace std
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat2x2<T,P> >
+	struct hash<glm::mat<2, 2, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat2x2<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<2, 2, T,P> const & m) const;
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat2x3<T,P> >
+	struct hash<glm::mat<2, 3, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat2x3<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<2, 3, T,P> const & m) const;
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat2x4<T,P> >
+	struct hash<glm::mat<2, 4, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat2x4<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<2, 4, T,P> const & m) const;
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat3x2<T,P> >
+	struct hash<glm::mat<3, 2, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat3x2<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<3, 2, T,P> const & m) const;
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat3x3<T,P> >
+	struct hash<glm::mat<3, 3, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat3x3<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<3, 3, T,P> const & m) const;
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat3x4<T,P> >
+	struct hash<glm::mat<3, 4, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat3x4<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<3, 4, T,P> const & m) const;
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat4x2<T,P> >
+	struct hash<glm::mat<4, 2, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat4x2<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,P> const & m) const;
 	};
 	};
 	
 	
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat4x3<T,P> >
+	struct hash<glm::mat<4, 3, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat4x3<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<4, 3, T,P> const & m) const;
 	};
 	};
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	struct hash<glm::tmat4x4<T,P> >
+	struct hash<glm::mat<4, 4, T,P> >
 	{
 	{
-		GLM_FUNC_DECL size_t operator()(glm::tmat4x4<T,P> const & m) const;
+		GLM_FUNC_DECL size_t operator()(glm::mat<4, 4, T,P> const & m) const;
 	};
 	};
 } // namespace std
 } // namespace std
 
 

+ 9 - 9
glm/gtx/hash.inl

@@ -85,7 +85,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x2<T, P>>::operator()(glm::tmat2x2<T, P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 2, T, P>>::operator()(glm::mat<2, 2, T, P> const& m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<2, T, P>> hasher;
 		hash<glm::vec<2, T, P>> hasher;
@@ -95,7 +95,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x3<T, P>>::operator()(glm::tmat2x3<T, P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 3, T, P>>::operator()(glm::mat<2, 3, T, P> const& m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<3, T, P>> hasher;
 		hash<glm::vec<3, T, P>> hasher;
@@ -105,7 +105,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x4<T, P>>::operator()(glm::tmat2x4<T, P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 4, T, P>>::operator()(glm::mat<2, 4, T, P> const& m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<4, T, P>> hasher;
 		hash<glm::vec<4, T, P>> hasher;
@@ -115,7 +115,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x2<T, P>>::operator()(glm::tmat3x2<T, P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 2, T, P>>::operator()(glm::mat<3, 2, T, P> const& m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<2, T, P>> hasher;
 		hash<glm::vec<2, T, P>> hasher;
@@ -126,7 +126,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x3<T, P>>::operator()(glm::tmat3x3<T, P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 3, T, P>>::operator()(glm::mat<3, 3, T, P> const& m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<3, T, P>> hasher;
 		hash<glm::vec<3, T, P>> hasher;
@@ -137,7 +137,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x4<T, P>>::operator()(glm::tmat3x4<T, P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 4, T, P>>::operator()(glm::mat<3, 4, T, P> const& m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<4, T, P>> hasher;
 		hash<glm::vec<4, T, P>> hasher;
@@ -148,7 +148,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x2<T,P>>::operator()(glm::tmat4x2<T,P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 2, T,P>>::operator()(glm::mat<4, 2, T,P> const & m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<2, T, P>> hasher;
 		hash<glm::vec<2, T, P>> hasher;
@@ -160,7 +160,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x3<T,P>>::operator()(glm::tmat4x3<T,P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 3, T,P>>::operator()(glm::mat<4, 3, T,P> const & m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<3, T, P>> hasher;
 		hash<glm::vec<3, T, P>> hasher;
@@ -172,7 +172,7 @@ namespace std
 	}
 	}
 
 
 	template <typename T, glm::precision P>
 	template <typename T, glm::precision P>
-	GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x4<T,P>>::operator()(glm::tmat4x4<T, P> const & m) const
+	GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 4, T,P>>::operator()(glm::mat<4, 4, T, P> const& m) const
 	{
 	{
 		size_t seed = 0;
 		size_t seed = 0;
 		hash<glm::vec<4, T, P>> hasher;
 		hash<glm::vec<4, T, P>> hasher;

+ 10 - 10
glm/gtx/io.hpp

@@ -173,27 +173,27 @@ namespace glm
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
 	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<4, T,P> const&);
 	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<4, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<2, 2, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x3<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<2, 3, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x4<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<2, 4, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x2<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<3, 2, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x3<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<3, 3, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x4<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<3, 4, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x2<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<4, 2, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x3<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<4, 3, T,P> const&);
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x4<T,P> const&);
+	GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<4, 4, T,P> const&);
 
 
   template <typename CTy, typename CTr, typename T, precision P>
   template <typename CTy, typename CTr, typename T, precision P>
 	GLM_FUNC_DECL std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr> &,
 	GLM_FUNC_DECL std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr> &,
-                                                         std::pair<tmat4x4<T,P> const, tmat4x4<T,P> const> const &);
+                                                         std::pair<mat<4, 4, T,P> const, mat<4, 4, T,P> const> const &);
 
 
 	/// @}
 	/// @}
 }//namespace glm
 }//namespace glm

+ 21 - 21
glm/gtx/io.inl

@@ -227,8 +227,8 @@ namespace detail
 
 
 namespace detail
 namespace detail
 {
 {
-	template <typename CTy, typename CTr, template <typename, precision> class M, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_on(std::basic_ostream<CTy, CTr>& os, M<T,P> const& a)
+	template <typename CTy, typename CTr, template <length_t, length_t, typename, precision> class M, length_t C, length_t R, typename T, precision P>
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_on(std::basic_ostream<CTy, CTr>& os, M<C, R, T, P> const& a)
 	{
 	{
 		typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
 		typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
 
 
@@ -236,8 +236,8 @@ namespace detail
 		{
 		{
 			io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
 			io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
 
 
-			length_t const& cols(type<M<T, P>>::cols);
-			length_t const& rows(type<M<T, P>>::rows);
+			length_t const& cols(type<M<C, R, T, P> >::cols);
+			length_t const& rows(type<M<C, R, T, P> >::rows);
 
 
 			if(fmt.formatted)
 			if(fmt.formatted)
 			{
 			{
@@ -314,73 +314,73 @@ namespace detail
 }//namespace detail
 }//namespace detail
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<2, 2, T, P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<2, 3, T, P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<2, 4, T, P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<3, 2, T,P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<3, 3, T,P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<3, 4, T,P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<4, 2, T,P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<4, 3, T,P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& a)
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<4, 4, T,P> const& a)
 	{
 	{
 		return detail::print_matrix_on(os, a);
 		return detail::print_matrix_on(os, a);
 	}
 	}
 
 
 namespace detail
 namespace detail
 {
 {
-	template <typename CTy, typename CTr, template <typename, precision> class M, typename T, precision P>
-	GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_pair_on(std::basic_ostream<CTy, CTr>& os, std::pair<M<T, P> const, M<T, P> const> const& a)
+	template <typename CTy, typename CTr, template <length_t, length_t, typename, precision> class M, length_t C, length_t R, typename T, precision P>
+	GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_pair_on(std::basic_ostream<CTy, CTr>& os, std::pair<M<C, R, T, P> const, M<C, R, T, P> const> const& a)
 	{
 	{
 		typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
 		typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
 
 
 		if(cerberus)
 		if(cerberus)
 		{
 		{
 			io::format_punct<CTy> const& fmt(io::get_facet<io::format_punct<CTy> >(os));
 			io::format_punct<CTy> const& fmt(io::get_facet<io::format_punct<CTy> >(os));
-			M<T,P> const& ml(a.first);
-			M<T,P> const& mr(a.second);
-			length_t const& cols(type<M<T, P>>::cols);
-			length_t const& rows(type<M<T, P>>::rows);
+			M<C, R, T,P> const& ml(a.first);
+			M<C, R, T,P> const& mr(a.second);
+			length_t const& cols(type<M<C, R, T, P>>::cols);
+			length_t const& rows(type<M<C, R, T, P>>::rows);
 
 
 			if(fmt.formatted)
 			if(fmt.formatted)
 			{
 			{
@@ -433,8 +433,8 @@ namespace detail
 	template <typename CTy, typename CTr, typename T, precision P>
 	template <typename CTy, typename CTr, typename T, precision P>
 	GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(
 	GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(
 		std::basic_ostream<CTy, CTr> & os,
 		std::basic_ostream<CTy, CTr> & os,
-		std::pair<tmat4x4<T, P> const,
-		tmat4x4<T, P> const> const& a)
+		std::pair<mat<4, 4, T, P> const,
+		mat<4, 4, T, P> const> const& a)
 	{
 	{
 		return detail::print_matrix_pair_on(os, a);
 		return detail::print_matrix_pair_on(os, a);
 	}
 	}

+ 2 - 2
glm/gtx/matrix_cross_product.hpp

@@ -32,13 +32,13 @@ namespace glm
 	//! Build a cross product matrix.
 	//! Build a cross product matrix.
 	//! From GLM_GTX_matrix_cross_product extension.
 	//! From GLM_GTX_matrix_cross_product extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> matrixCross3(
+	GLM_FUNC_DECL mat<3, 3, T, P> matrixCross3(
 		vec<3, T, P> const & x);
 		vec<3, T, P> const & x);
 		
 		
 	//! Build a cross product matrix.
 	//! Build a cross product matrix.
 	//! From GLM_GTX_matrix_cross_product extension.
 	//! From GLM_GTX_matrix_cross_product extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> matrixCross4(
+	GLM_FUNC_DECL mat<4, 4, T, P> matrixCross4(
 		vec<3, T, P> const & x);
 		vec<3, T, P> const & x);
 
 
 	/// @}
 	/// @}

+ 4 - 4
glm/gtx/matrix_cross_product.inl

@@ -4,12 +4,12 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> matrixCross3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> matrixCross3
 	(
 	(
 		vec<3, T, P> const & x
 		vec<3, T, P> const & x
 	)
 	)
 	{
 	{
-		tmat3x3<T, P> Result(T(0));
+		mat<3, 3, T, P> Result(T(0));
 		Result[0][1] = x.z;
 		Result[0][1] = x.z;
 		Result[1][0] = -x.z;
 		Result[1][0] = -x.z;
 		Result[0][2] = -x.y;
 		Result[0][2] = -x.y;
@@ -20,12 +20,12 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> matrixCross4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> matrixCross4
 	(
 	(
 		vec<3, T, P> const & x
 		vec<3, T, P> const & x
 	)
 	)
 	{
 	{
-		tmat4x4<T, P> Result(T(0));
+		mat<4, 4, T, P> Result(T(0));
 		Result[0][1] = x.z;
 		Result[0][1] = x.z;
 		Result[1][0] = -x.z;
 		Result[1][0] = -x.z;
 		Result[0][2] = -x.y;
 		Result[0][2] = -x.y;

+ 1 - 1
glm/gtx/matrix_decompose.hpp

@@ -37,7 +37,7 @@ namespace glm
 	/// @see gtx_matrix_decompose
 	/// @see gtx_matrix_decompose
 	template <typename T, precision P>
 	template <typename T, precision P>
 	GLM_FUNC_DECL bool decompose(
 	GLM_FUNC_DECL bool decompose(
-		tmat4x4<T, P> const & modelMatrix,
+		mat<4, 4, T, P> const& modelMatrix,
 		vec<3, T, P> & scale, tquat<T, P> & orientation, vec<3, T, P> & translation, vec<3, T, P> & skew, vec<4, T, P> & perspective);
 		vec<3, T, P> & scale, tquat<T, P> & orientation, vec<3, T, P> & translation, vec<3, T, P> & skew, vec<4, T, P> & perspective);
 
 
 	/// @}
 	/// @}

+ 5 - 5
glm/gtx/matrix_decompose.inl

@@ -27,9 +27,9 @@ namespace detail
 	// Decomposes the mode matrix to translations,rotation scale components
 	// Decomposes the mode matrix to translations,rotation scale components
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER bool decompose(tmat4x4<T, P> const & ModelMatrix, vec<3, T, P> & Scale, tquat<T, P> & Orientation, vec<3, T, P> & Translation, vec<3, T, P> & Skew, vec<4, T, P> & Perspective)
+	GLM_FUNC_QUALIFIER bool decompose(mat<4, 4, T, P> const & ModelMatrix, vec<3, T, P> & Scale, tquat<T, P> & Orientation, vec<3, T, P> & Translation, vec<3, T, P> & Skew, vec<4, T, P> & Perspective)
 	{
 	{
-		tmat4x4<T, P> LocalMatrix(ModelMatrix);
+		mat<4, 4, T, P> LocalMatrix(ModelMatrix);
 
 
 		// Normalize the matrix.
 		// Normalize the matrix.
 		if(LocalMatrix[3][3] == static_cast<T>(0))
 		if(LocalMatrix[3][3] == static_cast<T>(0))
@@ -41,7 +41,7 @@ namespace detail
 
 
 		// perspectiveMatrix is used to solve for perspective, but it also provides
 		// perspectiveMatrix is used to solve for perspective, but it also provides
 		// an easy way to test for singularity of the upper 3x3 component.
 		// an easy way to test for singularity of the upper 3x3 component.
-		tmat4x4<T, P> PerspectiveMatrix(LocalMatrix);
+		mat<4, 4, T, P> PerspectiveMatrix(LocalMatrix);
 
 
 		for(length_t i = 0; i < 3; i++)
 		for(length_t i = 0; i < 3; i++)
 			PerspectiveMatrix[i][3] = static_cast<T>(0);
 			PerspectiveMatrix[i][3] = static_cast<T>(0);
@@ -64,8 +64,8 @@ namespace detail
 			// Solve the equation by inverting PerspectiveMatrix and multiplying
 			// Solve the equation by inverting PerspectiveMatrix and multiplying
 			// rightHandSide by the inverse.  (This is the easiest way, not
 			// rightHandSide by the inverse.  (This is the easiest way, not
 			// necessarily the best.)
 			// necessarily the best.)
-			tmat4x4<T, P> InversePerspectiveMatrix = glm::inverse(PerspectiveMatrix);//   inverse(PerspectiveMatrix, inversePerspectiveMatrix);
-			tmat4x4<T, P> TransposedInversePerspectiveMatrix = glm::transpose(InversePerspectiveMatrix);//   transposeMatrix4(inversePerspectiveMatrix, transposedInversePerspectiveMatrix);
+			mat<4, 4, T, P> InversePerspectiveMatrix = glm::inverse(PerspectiveMatrix);//   inverse(PerspectiveMatrix, inversePerspectiveMatrix);
+			mat<4, 4, T, P> TransposedInversePerspectiveMatrix = glm::transpose(InversePerspectiveMatrix);//   transposeMatrix4(inversePerspectiveMatrix, transposedInversePerspectiveMatrix);
 
 
 			Perspective = TransposedInversePerspectiveMatrix * RightHandSide;
 			Perspective = TransposedInversePerspectiveMatrix * RightHandSide;
 			//  v4MulPointByMatrix(rightHandSide, transposedInversePerspectiveMatrix, perspectivePoint);
 			//  v4MulPointByMatrix(rightHandSide, transposedInversePerspectiveMatrix, perspectivePoint);

+ 7 - 7
glm/gtx/matrix_interpolation.hpp

@@ -33,30 +33,30 @@ namespace glm
 	/// From GLM_GTX_matrix_interpolation extension.
 	/// From GLM_GTX_matrix_interpolation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
 	GLM_FUNC_DECL void axisAngle(
 	GLM_FUNC_DECL void axisAngle(
-		tmat4x4<T, P> const & mat,
+		mat<4, 4, T, P> const& mat,
 		vec<3, T, P> & axis,
 		vec<3, T, P> & axis,
 		T & angle);
 		T & angle);
 
 
 	/// Build a matrix from axis and angle.
 	/// Build a matrix from axis and angle.
 	/// From GLM_GTX_matrix_interpolation extension.
 	/// From GLM_GTX_matrix_interpolation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> axisAngleMatrix(
+	GLM_FUNC_DECL mat<4, 4, T, P> axisAngleMatrix(
 		vec<3, T, P> const & axis,
 		vec<3, T, P> const & axis,
 		T const angle);
 		T const angle);
 
 
 	/// Extracts the rotation part of a matrix.
 	/// Extracts the rotation part of a matrix.
 	/// From GLM_GTX_matrix_interpolation extension.
 	/// From GLM_GTX_matrix_interpolation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> extractMatrixRotation(
-		tmat4x4<T, P> const & mat);
+	GLM_FUNC_DECL mat<4, 4, T, P> extractMatrixRotation(
+		mat<4, 4, T, P> const& mat);
 
 
 	/// Build a interpolation of 4 * 4 matrixes.
 	/// Build a interpolation of 4 * 4 matrixes.
 	/// From GLM_GTX_matrix_interpolation extension.
 	/// From GLM_GTX_matrix_interpolation extension.
 	/// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
 	/// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> interpolate(
-		tmat4x4<T, P> const & m1,
-		tmat4x4<T, P> const & m2,
+	GLM_FUNC_DECL mat<4, 4, T, P> interpolate(
+		mat<4, 4, T, P> const& m1,
+		mat<4, 4, T, P> const& m2,
 		T const delta);
 		T const delta);
 
 
 	/// @}
 	/// @}

+ 12 - 12
glm/gtx/matrix_interpolation.inl

@@ -6,7 +6,7 @@ namespace glm
 	template <typename T, precision P>
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER void axisAngle
 	GLM_FUNC_QUALIFIER void axisAngle
 	(
 	(
-		tmat4x4<T, P> const & mat,
+		mat<4, 4, T, P> const& mat,
 		vec<3, T, P> & axis,
 		vec<3, T, P> & axis,
 		T & angle
 		T & angle
 	)
 	)
@@ -79,7 +79,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> axisAngleMatrix
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> axisAngleMatrix
 	(
 	(
 		vec<3, T, P> const & axis,
 		vec<3, T, P> const & axis,
 		T const angle
 		T const angle
@@ -90,7 +90,7 @@ namespace glm
 		T t = static_cast<T>(1) - c;
 		T t = static_cast<T>(1) - c;
 		vec<3, T, P> n = normalize(axis);
 		vec<3, T, P> n = normalize(axis);
 
 
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			t * n.x * n.x + c,          t * n.x * n.y + n.z * s,    t * n.x * n.z - n.y * s,    T(0),
 			t * n.x * n.x + c,          t * n.x * n.y + n.z * s,    t * n.x * n.z - n.y * s,    T(0),
 			t * n.x * n.y - n.z * s,    t * n.y * n.y + c,          t * n.y * n.z + n.x * s,    T(0),
 			t * n.x * n.y - n.z * s,    t * n.y * n.y + c,          t * n.y * n.z + n.x * s,    T(0),
 			t * n.x * n.z + n.y * s,    t * n.y * n.z - n.x * s,    t * n.z * n.z + c,          T(0),
 			t * n.x * n.z + n.y * s,    t * n.y * n.z - n.x * s,    t * n.z * n.z + c,          T(0),
@@ -99,12 +99,12 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> extractMatrixRotation
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> extractMatrixRotation
 	(
 	(
-		tmat4x4<T, P> const & mat
+		mat<4, 4, T, P> const& mat
 	)
 	)
 	{
 	{
-		return tmat4x4<T, P>(
+		return mat<4, 4, T, P>(
 			mat[0][0], mat[0][1], mat[0][2], 0.0,
 			mat[0][0], mat[0][1], mat[0][2], 0.0,
 			mat[1][0], mat[1][1], mat[1][2], 0.0,
 			mat[1][0], mat[1][1], mat[1][2], 0.0,
 			mat[2][0], mat[2][1], mat[2][2], 0.0,
 			mat[2][0], mat[2][1], mat[2][2], 0.0,
@@ -113,19 +113,19 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> interpolate
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> interpolate
 	(
 	(
-		tmat4x4<T, P> const & m1,
-		tmat4x4<T, P> const & m2,
+		mat<4, 4, T, P> const& m1,
+		mat<4, 4, T, P> const& m2,
 		T const delta
 		T const delta
 	)
 	)
 	{
 	{
-		tmat4x4<T, P> m1rot = extractMatrixRotation(m1);
-		tmat4x4<T, P> dltRotation = m2 * transpose(m1rot);
+		mat<4, 4, T, P> m1rot = extractMatrixRotation(m1);
+		mat<4, 4, T, P> dltRotation = m2 * transpose(m1rot);
 		vec<3, T, P> dltAxis;
 		vec<3, T, P> dltAxis;
 		T dltAngle;
 		T dltAngle;
 		axisAngle(dltRotation, dltAxis, dltAngle);
 		axisAngle(dltRotation, dltAxis, dltAngle);
-		tmat4x4<T, P> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;
+		mat<4, 4, T, P> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;
 		out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]);
 		out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]);
 		out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]);
 		out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]);
 		out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]);
 		out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]);

+ 18 - 18
glm/gtx/matrix_major_storage.hpp

@@ -32,20 +32,20 @@ namespace glm
 	//! Build a row major matrix from row vectors.
 	//! Build a row major matrix from row vectors.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
+	GLM_FUNC_DECL mat<2, 2, T, P> rowMajor2(
 		vec<2, T, P> const & v1, 
 		vec<2, T, P> const & v1, 
 		vec<2, T, P> const & v2);
 		vec<2, T, P> const & v2);
 		
 		
 	//! Build a row major matrix from other matrix.
 	//! Build a row major matrix from other matrix.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
-		tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> rowMajor2(
+		mat<2, 2, T, P> const& m);
 
 
 	//! Build a row major matrix from row vectors.
 	//! Build a row major matrix from row vectors.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
+	GLM_FUNC_DECL mat<3, 3, T, P> rowMajor3(
 		vec<3, T, P> const & v1, 
 		vec<3, T, P> const & v1, 
 		vec<3, T, P> const & v2, 
 		vec<3, T, P> const & v2, 
 		vec<3, T, P> const & v3);
 		vec<3, T, P> const & v3);
@@ -53,13 +53,13 @@ namespace glm
 	//! Build a row major matrix from other matrix.
 	//! Build a row major matrix from other matrix.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
-		tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> rowMajor3(
+		mat<3, 3, T, P> const& m);
 
 
 	//! Build a row major matrix from row vectors.
 	//! Build a row major matrix from row vectors.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> rowMajor4(
+	GLM_FUNC_DECL mat<4, 4, T, P> rowMajor4(
 		vec<4, T, P> const & v1, 
 		vec<4, T, P> const & v1, 
 		vec<4, T, P> const & v2,
 		vec<4, T, P> const & v2,
 		vec<4, T, P> const & v3, 
 		vec<4, T, P> const & v3, 
@@ -68,26 +68,26 @@ namespace glm
 	//! Build a row major matrix from other matrix.
 	//! Build a row major matrix from other matrix.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> rowMajor4(
-		tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> rowMajor4(
+		mat<4, 4, T, P> const& m);
 
 
 	//! Build a column major matrix from column vectors.
 	//! Build a column major matrix from column vectors.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
+	GLM_FUNC_DECL mat<2, 2, T, P> colMajor2(
 		vec<2, T, P> const & v1, 
 		vec<2, T, P> const & v1, 
 		vec<2, T, P> const & v2);
 		vec<2, T, P> const & v2);
 		
 		
 	//! Build a column major matrix from other matrix.
 	//! Build a column major matrix from other matrix.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
-		tmat2x2<T, P> const & m);
+	GLM_FUNC_DECL mat<2, 2, T, P> colMajor2(
+		mat<2, 2, T, P> const& m);
 
 
 	//! Build a column major matrix from column vectors.
 	//! Build a column major matrix from column vectors.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
+	GLM_FUNC_DECL mat<3, 3, T, P> colMajor3(
 		vec<3, T, P> const & v1, 
 		vec<3, T, P> const & v1, 
 		vec<3, T, P> const & v2, 
 		vec<3, T, P> const & v2, 
 		vec<3, T, P> const & v3);
 		vec<3, T, P> const & v3);
@@ -95,13 +95,13 @@ namespace glm
 	//! Build a column major matrix from other matrix.
 	//! Build a column major matrix from other matrix.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
-		tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> colMajor3(
+		mat<3, 3, T, P> const& m);
 		
 		
 	//! Build a column major matrix from column vectors.
 	//! Build a column major matrix from column vectors.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> colMajor4(
+	GLM_FUNC_DECL mat<4, 4, T, P> colMajor4(
 		vec<4, T, P> const & v1, 
 		vec<4, T, P> const & v1, 
 		vec<4, T, P> const & v2, 
 		vec<4, T, P> const & v2, 
 		vec<4, T, P> const & v3, 
 		vec<4, T, P> const & v3, 
@@ -110,8 +110,8 @@ namespace glm
 	//! Build a column major matrix from other matrix.
 	//! Build a column major matrix from other matrix.
 	//! From GLM_GTX_matrix_major_storage extension.
 	//! From GLM_GTX_matrix_major_storage extension.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat4x4<T, P> colMajor4(
-		tmat4x4<T, P> const & m);
+	GLM_FUNC_DECL mat<4, 4, T, P> colMajor4(
+		mat<4, 4, T, P> const& m);
 
 
 	/// @}
 	/// @}
 }//namespace glm
 }//namespace glm

+ 30 - 30
glm/gtx/matrix_major_storage.inl

@@ -4,13 +4,13 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> rowMajor2
 	(
 	(
 		vec<2, T, P> const & v1, 
 		vec<2, T, P> const & v1, 
 		vec<2, T, P> const & v2
 		vec<2, T, P> const & v2
 	)
 	)
 	{
 	{
-		tmat2x2<T, P> Result;
+		mat<2, 2, T, P> Result;
 		Result[0][0] = v1.x;
 		Result[0][0] = v1.x;
 		Result[1][0] = v1.y;
 		Result[1][0] = v1.y;
 		Result[0][1] = v2.x;
 		Result[0][1] = v2.x;
@@ -19,10 +19,10 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2(
-		const tmat2x2<T, P>& m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> rowMajor2(
+		const mat<2, 2, T, P>& m)
 	{
 	{
-		tmat2x2<T, P> Result;
+		mat<2, 2, T, P> Result;
 		Result[0][0] = m[0][0];
 		Result[0][0] = m[0][0];
 		Result[0][1] = m[1][0];
 		Result[0][1] = m[1][0];
 		Result[1][0] = m[0][1];
 		Result[1][0] = m[0][1];
@@ -31,12 +31,12 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> rowMajor3(
 		const vec<3, T, P>& v1, 
 		const vec<3, T, P>& v1, 
 		const vec<3, T, P>& v2, 
 		const vec<3, T, P>& v2, 
 		const vec<3, T, P>& v3)
 		const vec<3, T, P>& v3)
 	{
 	{
-		tmat3x3<T, P> Result;
+		mat<3, 3, T, P> Result;
 		Result[0][0] = v1.x;
 		Result[0][0] = v1.x;
 		Result[1][0] = v1.y;
 		Result[1][0] = v1.y;
 		Result[2][0] = v1.z;
 		Result[2][0] = v1.z;
@@ -50,10 +50,10 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
-		const tmat3x3<T, P>& m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> rowMajor3(
+		const mat<3, 3, T, P>& m)
 	{
 	{
-		tmat3x3<T, P> Result;
+		mat<3, 3, T, P> Result;
 		Result[0][0] = m[0][0];
 		Result[0][0] = m[0][0];
 		Result[0][1] = m[1][0];
 		Result[0][1] = m[1][0];
 		Result[0][2] = m[2][0];
 		Result[0][2] = m[2][0];
@@ -67,13 +67,13 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4(
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> rowMajor4(
 		const vec<4, T, P>& v1, 
 		const vec<4, T, P>& v1, 
 		const vec<4, T, P>& v2, 
 		const vec<4, T, P>& v2, 
 		const vec<4, T, P>& v3, 
 		const vec<4, T, P>& v3, 
 		const vec<4, T, P>& v4)
 		const vec<4, T, P>& v4)
 	{
 	{
-		tmat4x4<T, P> Result;
+		mat<4, 4, T, P> Result;
 		Result[0][0] = v1.x;
 		Result[0][0] = v1.x;
 		Result[1][0] = v1.y;
 		Result[1][0] = v1.y;
 		Result[2][0] = v1.z;
 		Result[2][0] = v1.z;
@@ -94,10 +94,10 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4(
-		const tmat4x4<T, P>& m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> rowMajor4(
+		const mat<4, 4, T, P>& m)
 	{
 	{
-		tmat4x4<T, P> Result;
+		mat<4, 4, T, P> Result;
 		Result[0][0] = m[0][0];
 		Result[0][0] = m[0][0];
 		Result[0][1] = m[1][0];
 		Result[0][1] = m[1][0];
 		Result[0][2] = m[2][0];
 		Result[0][2] = m[2][0];
@@ -118,50 +118,50 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> colMajor2(
 		const vec<2, T, P>& v1, 
 		const vec<2, T, P>& v1, 
 		const vec<2, T, P>& v2)
 		const vec<2, T, P>& v2)
 	{
 	{
-		return tmat2x2<T, P>(v1, v2);
+		return mat<2, 2, T, P>(v1, v2);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
-		const tmat2x2<T, P>& m)
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> colMajor2(
+		const mat<2, 2, T, P>& m)
 	{
 	{
-		return tmat2x2<T, P>(m);
+		return mat<2, 2, T, P>(m);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> colMajor3(
 		const vec<3, T, P>& v1, 
 		const vec<3, T, P>& v1, 
 		const vec<3, T, P>& v2, 
 		const vec<3, T, P>& v2, 
 		const vec<3, T, P>& v3)
 		const vec<3, T, P>& v3)
 	{
 	{
-		return tmat3x3<T, P>(v1, v2, v3);
+		return mat<3, 3, T, P>(v1, v2, v3);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
-		const tmat3x3<T, P>& m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> colMajor3(
+		const mat<3, 3, T, P>& m)
 	{
 	{
-		return tmat3x3<T, P>(m);
+		return mat<3, 3, T, P>(m);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4(
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> colMajor4(
 		const vec<4, T, P>& v1, 
 		const vec<4, T, P>& v1, 
 		const vec<4, T, P>& v2, 
 		const vec<4, T, P>& v2, 
 		const vec<4, T, P>& v3, 
 		const vec<4, T, P>& v3, 
 		const vec<4, T, P>& v4)
 		const vec<4, T, P>& v4)
 	{
 	{
-		return tmat4x4<T, P>(v1, v2, v3, v4);
+		return mat<4, 4, T, P>(v1, v2, v3, v4);
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4(
-		const tmat4x4<T, P>& m)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> colMajor4(
+		const mat<4, 4, T, P>& m)
 	{
 	{
-		return tmat4x4<T, P>(m);
+		return mat<4, 4, T, P>(m);
 	}
 	}
 }//namespace glm
 }//namespace glm

+ 9 - 9
glm/gtx/matrix_operation.hpp

@@ -31,55 +31,55 @@ namespace glm
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x2<T, P> diagonal2x2(
+	GLM_FUNC_DECL mat<2, 2, T, P> diagonal2x2(
 		vec<2, T, P> const & v);
 		vec<2, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x3<T, P> diagonal2x3(
+	GLM_FUNC_DECL mat<2, 3, T, P> diagonal2x3(
 		vec<2, T, P> const & v);
 		vec<2, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat2x4<T, P> diagonal2x4(
+	GLM_FUNC_DECL mat<2, 4, T, P> diagonal2x4(
 		vec<2, T, P> const & v);
 		vec<2, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x2<T, P> diagonal3x2(
+	GLM_FUNC_DECL mat<3, 2, T, P> diagonal3x2(
 		vec<2, T, P> const & v);
 		vec<2, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> diagonal3x3(
+	GLM_FUNC_DECL mat<3, 3, T, P> diagonal3x3(
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x4<T, P> diagonal3x4(
+	GLM_FUNC_DECL mat<3, 4, T, P> diagonal3x4(
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x2<T, P> diagonal4x2(
+	GLM_FUNC_DECL mat<4, 2, T, P> diagonal4x2(
 		vec<2, T, P> const & v);
 		vec<2, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x3<T, P> diagonal4x3(
+	GLM_FUNC_DECL mat<4, 3, T, P> diagonal4x3(
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 
 
 	//! Build a diagonal matrix.
 	//! Build a diagonal matrix.
 	//! From GLM_GTX_matrix_operation extension.
 	//! From GLM_GTX_matrix_operation extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> diagonal4x4(
+	GLM_FUNC_DECL mat<4, 4, T, P> diagonal4x4(
 		vec<4, T, P> const & v);
 		vec<4, T, P> const & v);
 
 
 	/// @}
 	/// @}

+ 18 - 18
glm/gtx/matrix_operation.inl

@@ -4,60 +4,60 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x2<T, P> diagonal2x2
+	GLM_FUNC_QUALIFIER mat<2, 2, T, P> diagonal2x2
 	(
 	(
 		vec<2, T, P> const & v
 		vec<2, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat2x2<T, P> Result(static_cast<T>(1));
+		mat<2, 2, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x3<T, P> diagonal2x3
+	GLM_FUNC_QUALIFIER mat<2, 3, T, P> diagonal2x3
 	(
 	(
 		vec<2, T, P> const & v
 		vec<2, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat2x3<T, P> Result(static_cast<T>(1));
+		mat<2, 3, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat2x4<T, P> diagonal2x4
+	GLM_FUNC_QUALIFIER mat<2, 4, T, P> diagonal2x4
 	(
 	(
 		vec<2, T, P> const & v
 		vec<2, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat2x4<T, P> Result(static_cast<T>(1));
+		mat<2, 4, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x2<T, P> diagonal3x2
+	GLM_FUNC_QUALIFIER mat<3, 2, T, P> diagonal3x2
 	(
 	(
 		vec<2, T, P> const & v
 		vec<2, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat3x2<T, P> Result(static_cast<T>(1));
+		mat<3, 2, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		return Result;
 		return Result;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> diagonal3x3
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> diagonal3x3
 	(
 	(
 		vec<3, T, P> const & v
 		vec<3, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat3x3<T, P> Result(static_cast<T>(1));
+		mat<3, 3, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		Result[2][2] = v[2];
 		Result[2][2] = v[2];
@@ -65,12 +65,12 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x4<T, P> diagonal3x4
+	GLM_FUNC_QUALIFIER mat<3, 4, T, P> diagonal3x4
 	(
 	(
 		vec<3, T, P> const & v
 		vec<3, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat3x4<T, P> Result(static_cast<T>(1));
+		mat<3, 4, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		Result[2][2] = v[2];
 		Result[2][2] = v[2];
@@ -78,12 +78,12 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> diagonal4x4
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> diagonal4x4
 	(
 	(
 		vec<4, T, P> const & v
 		vec<4, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat4x4<T, P> Result(static_cast<T>(1));
+		mat<4, 4, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		Result[2][2] = v[2];
 		Result[2][2] = v[2];
@@ -92,12 +92,12 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x3<T, P> diagonal4x3
+	GLM_FUNC_QUALIFIER mat<4, 3, T, P> diagonal4x3
 	(
 	(
 		vec<3, T, P> const & v
 		vec<3, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat4x3<T, P> Result(static_cast<T>(1));
+		mat<4, 3, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		Result[2][2] = v[2];
 		Result[2][2] = v[2];
@@ -105,12 +105,12 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x2<T, P> diagonal4x2
+	GLM_FUNC_QUALIFIER mat<4, 2, T, P> diagonal4x2
 	(
 	(
 		vec<2, T, P> const & v
 		vec<2, T, P> const & v
 	)
 	)
 	{
 	{
-		tmat4x2<T, P> Result(static_cast<T>(1));
+		mat<4, 2, T, P> Result(static_cast<T>(1));
 		Result[0][0] = v[0];
 		Result[0][0] = v[0];
 		Result[1][1] = v[1];
 		Result[1][1] = v[1];
 		return Result;		
 		return Result;		

+ 10 - 10
glm/gtx/matrix_query.hpp

@@ -34,42 +34,42 @@ namespace glm
 	/// Return whether a matrix a null matrix.
 	/// Return whether a matrix a null matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL bool isNull(tmat2x2<T, P> const & m, T const & epsilon);
+	GLM_FUNC_DECL bool isNull(mat<2, 2, T, P> const & m, T const & epsilon);
 		
 		
 	/// Return whether a matrix a null matrix.
 	/// Return whether a matrix a null matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL bool isNull(tmat3x3<T, P> const & m, T const & epsilon);
+	GLM_FUNC_DECL bool isNull(mat<3, 3, T, P> const & m, T const & epsilon);
 		
 		
 	/// Return whether a matrix is a null matrix.
 	/// Return whether a matrix is a null matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL bool isNull(tmat4x4<T, P> const & m, T const & epsilon);
+	GLM_FUNC_DECL bool isNull(mat<4, 4, T, P> const & m, T const & epsilon);
 			
 			
 	/// Return whether a matrix is an identity matrix.
 	/// Return whether a matrix is an identity matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
-	template<typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_DECL bool isIdentity(matType<T, P> const & m, T const & epsilon);
+	template<length_t C, length_t R, typename T, precision P, template <length_t, length_t, typename, precision> class matType>
+	GLM_FUNC_DECL bool isIdentity(matType<C, R, T, P> const & m, T const & epsilon);
 
 
 	/// Return whether a matrix is a normalized matrix.
 	/// Return whether a matrix is a normalized matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon);
+	GLM_FUNC_DECL bool isNormalized(mat<2, 2, T, P> const & m, T const & epsilon);
 
 
 	/// Return whether a matrix is a normalized matrix.
 	/// Return whether a matrix is a normalized matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon);
+	GLM_FUNC_DECL bool isNormalized(mat<3, 3, T, P> const & m, T const & epsilon);
 
 
 	/// Return whether a matrix is a normalized matrix.
 	/// Return whether a matrix is a normalized matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon);
+	GLM_FUNC_DECL bool isNormalized(mat<4, 4, T, P> const & m, T const & epsilon);
 
 
 	/// Return whether a matrix is an orthonormalized matrix.
 	/// Return whether a matrix is an orthonormalized matrix.
 	/// From GLM_GTX_matrix_query extension.
 	/// From GLM_GTX_matrix_query extension.
-	template<typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_DECL bool isOrthogonal(matType<T, P> const & m, T const & epsilon);
+	template<length_t C, length_t R, typename T, precision P, template <length_t, length_t, typename, precision> class matType>
+	GLM_FUNC_DECL bool isOrthogonal(matType<C, R, T, P> const & m, T const & epsilon);
 
 
 	/// @}
 	/// @}
 }//namespace glm
 }//namespace glm

+ 14 - 14
glm/gtx/matrix_query.inl

@@ -4,7 +4,7 @@
 namespace glm
 namespace glm
 {
 {
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_QUALIFIER bool isNull(tmat2x2<T, P> const & m, T const & epsilon)
+	GLM_FUNC_QUALIFIER bool isNull(mat<2, 2, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result = true;
 		bool result = true;
 		for(length_t i = 0; result && i < m.length() ; ++i)
 		for(length_t i = 0; result && i < m.length() ; ++i)
@@ -13,7 +13,7 @@ namespace glm
 	}
 	}
 
 
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_QUALIFIER bool isNull(tmat3x3<T, P> const & m, T const & epsilon)
+	GLM_FUNC_QUALIFIER bool isNull(mat<3, 3, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result = true;
 		bool result = true;
 		for(length_t i = 0; result && i < m.length() ; ++i)
 		for(length_t i = 0; result && i < m.length() ; ++i)
@@ -22,7 +22,7 @@ namespace glm
 	}
 	}
 
 
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_QUALIFIER bool isNull(tmat4x4<T, P> const & m, T const & epsilon)
+	GLM_FUNC_QUALIFIER bool isNull(mat<4, 4, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result = true;
 		bool result = true;
 		for(length_t i = 0; result && i < m.length() ; ++i)
 		for(length_t i = 0; result && i < m.length() ; ++i)
@@ -30,8 +30,8 @@ namespace glm
 		return result;
 		return result;
 	}
 	}
 
 
-	template<typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_QUALIFIER bool isIdentity(matType<T, P> const & m, T const & epsilon)
+	template<length_t C, length_t R, typename T, precision P, template <length_t, length_t, typename, precision> class matType>
+	GLM_FUNC_QUALIFIER bool isIdentity(matType<C, R, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result = true;
 		bool result = true;
 		for(length_t i = 0; result && i < m[0].length() ; ++i)
 		for(length_t i = 0; result && i < m[0].length() ; ++i)
@@ -47,14 +47,14 @@ namespace glm
 	}
 	}
 
 
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_QUALIFIER bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon)
+	GLM_FUNC_QUALIFIER bool isNormalized(mat<2, 2, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result(true);
 		bool result(true);
 		for(length_t i = 0; result && i < m.length(); ++i)
 		for(length_t i = 0; result && i < m.length(); ++i)
 			result = isNormalized(m[i], epsilon);
 			result = isNormalized(m[i], epsilon);
 		for(length_t i = 0; result && i < m.length(); ++i)
 		for(length_t i = 0; result && i < m.length(); ++i)
 		{
 		{
-			typename tmat2x2<T, P>::col_type v;
+			typename mat<2, 2, T, P>::col_type v;
 			for(length_t j = 0; j < m.length(); ++j)
 			for(length_t j = 0; j < m.length(); ++j)
 				v[j] = m[j][i];
 				v[j] = m[j][i];
 			result = isNormalized(v, epsilon);
 			result = isNormalized(v, epsilon);
@@ -63,14 +63,14 @@ namespace glm
 	}
 	}
 
 
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_QUALIFIER bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon)
+	GLM_FUNC_QUALIFIER bool isNormalized(mat<3, 3, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result(true);
 		bool result(true);
 		for(length_t i = 0; result && i < m.length(); ++i)
 		for(length_t i = 0; result && i < m.length(); ++i)
 			result = isNormalized(m[i], epsilon);
 			result = isNormalized(m[i], epsilon);
 		for(length_t i = 0; result && i < m.length(); ++i)
 		for(length_t i = 0; result && i < m.length(); ++i)
 		{
 		{
-			typename tmat3x3<T, P>::col_type v;
+			typename mat<3, 3, T, P>::col_type v;
 			for(length_t j = 0; j < m.length(); ++j)
 			for(length_t j = 0; j < m.length(); ++j)
 				v[j] = m[j][i];
 				v[j] = m[j][i];
 			result = isNormalized(v, epsilon);
 			result = isNormalized(v, epsilon);
@@ -79,14 +79,14 @@ namespace glm
 	}
 	}
 
 
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_QUALIFIER bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon)
+	GLM_FUNC_QUALIFIER bool isNormalized(mat<4, 4, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result(true);
 		bool result(true);
 		for(length_t i = 0; result && i < m.length(); ++i)
 		for(length_t i = 0; result && i < m.length(); ++i)
 			result = isNormalized(m[i], epsilon);
 			result = isNormalized(m[i], epsilon);
 		for(length_t i = 0; result && i < m.length(); ++i)
 		for(length_t i = 0; result && i < m.length(); ++i)
 		{
 		{
-			typename tmat4x4<T, P>::col_type v;
+			typename mat<4, 4, T, P>::col_type v;
 			for(length_t j = 0; j < m.length(); ++j)
 			for(length_t j = 0; j < m.length(); ++j)
 				v[j] = m[j][i];
 				v[j] = m[j][i];
 			result = isNormalized(v, epsilon);
 			result = isNormalized(v, epsilon);
@@ -94,8 +94,8 @@ namespace glm
 		return result;
 		return result;
 	}
 	}
 
 
-	template<typename T, precision P, template <typename, precision> class matType>
-	GLM_FUNC_QUALIFIER bool isOrthogonal(matType<T, P> const & m, T const & epsilon)
+	template<length_t C, length_t R, typename T, precision P, template <length_t, length_t, typename, precision> class matType>
+	GLM_FUNC_QUALIFIER bool isOrthogonal(matType<C, R, T, P> const & m, T const & epsilon)
 	{
 	{
 		bool result(true);
 		bool result(true);
 		for(length_t i(0); result && i < m.length() - 1; ++i)
 		for(length_t i(0); result && i < m.length() - 1; ++i)
@@ -104,7 +104,7 @@ namespace glm
 
 
 		if(result)
 		if(result)
 		{
 		{
-			matType<T, P> tmp = transpose(m);
+			matType<C, R, T, P> tmp = transpose(m);
 			for(length_t i(0); result && i < m.length() - 1 ; ++i)
 			for(length_t i(0); result && i < m.length() - 1 ; ++i)
 			for(length_t j(i + 1); result && j < m.length(); ++j)
 			for(length_t j(i + 1); result && j < m.length(); ++j)
 				result = areOrthogonal(tmp[i], tmp[j], epsilon);
 				result = areOrthogonal(tmp[i], tmp[j], epsilon);

+ 10 - 10
glm/gtx/matrix_transform_2d.hpp

@@ -35,8 +35,8 @@ namespace glm
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param v Coordinates of a translation vector.		
 	/// @param v Coordinates of a translation vector.		
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> translate(
+		mat<3, 3, T, P> const& m,
 		vec<2, T, P> const & v);
 		vec<2, T, P> const & v);
 
 
 	/// Builds a rotation 3 * 3 matrix created from an angle. 
 	/// Builds a rotation 3 * 3 matrix created from an angle. 
@@ -44,8 +44,8 @@ namespace glm
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
 	/// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> rotate(
+		mat<3, 3, T, P> const& m,
 		T angle);
 		T angle);
 
 
 	/// Builds a scale 3 * 3 matrix created from a vector of 2 components.
 	/// Builds a scale 3 * 3 matrix created from a vector of 2 components.
@@ -53,8 +53,8 @@ namespace glm
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param v Coordinates of a scale vector.		
 	/// @param v Coordinates of a scale vector.		
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> scale(
+		mat<3, 3, T, P> const& m,
 		vec<2, T, P> const & v);
 		vec<2, T, P> const & v);
 
 
 	/// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix. 
 	/// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix. 
@@ -62,8 +62,8 @@ namespace glm
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param y Shear factor.
 	/// @param y Shear factor.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> shearX(
+		mat<3, 3, T, P> const& m,
 		T y);
 		T y);
 
 
 	/// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix. 
 	/// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix. 
@@ -71,8 +71,8 @@ namespace glm
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param m Input matrix multiplied by this translation matrix.
 	/// @param x Shear factor.
 	/// @param x Shear factor.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> shearY(
+		mat<3, 3, T, P> const& m,
 		T x);
 		T x);
 
 
 	/// @}
 	/// @}

+ 15 - 15
glm/gtx/matrix_transform_2d.inl

@@ -8,26 +8,26 @@ namespace glm
 {
 {
 	
 	
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> translate(
+		mat<3, 3, T, P> const& m,
 		vec<2, T, P> const & v)
 		vec<2, T, P> const & v)
 	{
 	{
-		tmat3x3<T, P> Result(m);
+		mat<3, 3, T, P> Result(m);
 		Result[2] = m[0] * v[0] + m[1] * v[1] + m[2];
 		Result[2] = m[0] * v[0] + m[1] * v[1] + m[2];
 		return Result;
 		return Result;
 	}
 	}
 
 
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> rotate(
+		mat<3, 3, T, P> const& m,
 		T angle)
 		T angle)
 	{
 	{
 		T const a = angle;
 		T const a = angle;
 		T const c = cos(a);
 		T const c = cos(a);
 		T const s = sin(a);
 		T const s = sin(a);
 
 
-		tmat3x3<T, P> Result(uninitialize);
+		mat<3, 3, T, P> Result(uninitialize);
 		Result[0] = m[0] * c + m[1] * s;
 		Result[0] = m[0] * c + m[1] * s;
 		Result[1] = m[0] * -s + m[1] * c;
 		Result[1] = m[0] * -s + m[1] * c;
 		Result[2] = m[2];
 		Result[2] = m[2];
@@ -35,11 +35,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> scale(
+		mat<3, 3, T, P> const& m,
 		vec<2, T, P> const & v)
 		vec<2, T, P> const & v)
 	{
 	{
-		tmat3x3<T, P> Result(uninitialize);
+		mat<3, 3, T, P> Result(uninitialize);
 		Result[0] = m[0] * v[0];
 		Result[0] = m[0] * v[0];
 		Result[1] = m[1] * v[1];
 		Result[1] = m[1] * v[1];
 		Result[2] = m[2];
 		Result[2] = m[2];
@@ -47,21 +47,21 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> shearX(
+		mat<3, 3, T, P> const& m,
 		T y)
 		T y)
 	{
 	{
-		tmat3x3<T, P> Result(1);
+		mat<3, 3, T, P> Result(1);
 		Result[0][1] = y;
 		Result[0][1] = y;
 		return m * Result;
 		return m * Result;
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
-		tmat3x3<T, P> const & m,
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> shearY(
+		mat<3, 3, T, P> const& m,
 		T x)
 		T x)
 	{
 	{
-		tmat3x3<T, P> Result(1);
+		mat<3, 3, T, P> Result(1);
 		Result[1][0] = x;
 		Result[1][0] = x;
 		return m * Result;
 		return m * Result;
 	}
 	}

+ 1 - 1
glm/gtx/orthonormalize.hpp

@@ -35,7 +35,7 @@ namespace glm
 	///
 	///
 	/// @see gtx_orthonormalize
 	/// @see gtx_orthonormalize
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m);
+	GLM_FUNC_DECL mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const & m);
 		
 		
 	/// Orthonormalizes x according y.
 	/// Orthonormalizes x according y.
 	///
 	///

+ 2 - 2
glm/gtx/orthonormalize.inl

@@ -4,9 +4,9 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const & m)
 	{
 	{
-		tmat3x3<T, P> r = m;
+		mat<3, 3, T, P> r = m;
 
 
 		r[0] = normalize(r[0]);
 		r[0] = normalize(r[0]);
 
 

+ 4 - 4
glm/gtx/quaternion.hpp

@@ -125,14 +125,14 @@ namespace glm
 	///
 	///
 	/// @see gtx_quaternion
 	/// @see gtx_quaternion
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> toMat3(
+	GLM_FUNC_DECL mat<3, 3, T, P> toMat3(
 		tquat<T, P> const & x){return mat3_cast(x);}
 		tquat<T, P> const & x){return mat3_cast(x);}
 
 
 	/// Converts a quaternion to a 4 * 4 matrix.
 	/// Converts a quaternion to a 4 * 4 matrix.
 	///
 	///
 	/// @see gtx_quaternion
 	/// @see gtx_quaternion
 	template<typename T, precision P>
 	template<typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> toMat4(
+	GLM_FUNC_DECL mat<4, 4, T, P> toMat4(
 		tquat<T, P> const & x){return mat4_cast(x);}
 		tquat<T, P> const & x){return mat4_cast(x);}
 
 
 	/// Converts a 3 * 3 matrix to a quaternion.
 	/// Converts a 3 * 3 matrix to a quaternion.
@@ -140,14 +140,14 @@ namespace glm
 	/// @see gtx_quaternion
 	/// @see gtx_quaternion
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_DECL tquat<T, P> toQuat(
 	GLM_FUNC_DECL tquat<T, P> toQuat(
-		tmat3x3<T, P> const & x){return quat_cast(x);}
+		mat<3, 3, T, P> const& x){return quat_cast(x);}
 
 
 	/// Converts a 4 * 4 matrix to a quaternion.
 	/// Converts a 4 * 4 matrix to a quaternion.
 	///
 	///
 	/// @see gtx_quaternion
 	/// @see gtx_quaternion
 	template<typename T, precision P>
 	template<typename T, precision P>
 	GLM_FUNC_DECL tquat<T, P> toQuat(
 	GLM_FUNC_DECL tquat<T, P> toQuat(
-		tmat4x4<T, P> const & x){return quat_cast(x);}
+		mat<4, 4, T, P> const& x){return quat_cast(x);}
 
 
 	/// Quaternion interpolation using the rotation short path.
 	/// Quaternion interpolation using the rotation short path.
 	///
 	///

+ 3 - 3
glm/gtx/rotate_normalized_axis.hpp

@@ -41,11 +41,11 @@ namespace glm
 	/// 
 	/// 
 	/// @see gtx_rotate_normalized_axis
 	/// @see gtx_rotate_normalized_axis
 	/// @see - rotate(T angle, T x, T y, T z) 
 	/// @see - rotate(T angle, T x, T y, T z) 
-	/// @see - rotate(tmat4x4<T, P> const & m, T angle, T x, T y, T z) 
+	/// @see - rotate(mat<4, 4, T, P> const & m, T angle, T x, T y, T z) 
 	/// @see - rotate(T angle, vec<3, T, P> const & v) 
 	/// @see - rotate(T angle, vec<3, T, P> const & v) 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> rotateNormalizedAxis(
-		tmat4x4<T, P> const & m,
+	GLM_FUNC_DECL mat<4, 4, T, P> rotateNormalizedAxis(
+		mat<4, 4, T, P> const& m,
 		T const & angle,
 		T const & angle,
 		vec<3, T, P> const & axis);
 		vec<3, T, P> const & axis);
 
 

+ 4 - 4
glm/gtx/rotate_normalized_axis.inl

@@ -4,9 +4,9 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> rotateNormalizedAxis
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotateNormalizedAxis
 	(
 	(
-		tmat4x4<T, P> const & m,
+		mat<4, 4, T, P> const& m,
 		T const & angle,
 		T const & angle,
 		vec<3, T, P> const & v
 		vec<3, T, P> const & v
 	)
 	)
@@ -19,7 +19,7 @@ namespace glm
 
 
 		vec<3, T, P> const temp((static_cast<T>(1) - c) * axis);
 		vec<3, T, P> const temp((static_cast<T>(1) - c) * axis);
 
 
-		tmat4x4<T, P> Rotate(uninitialize);
+		mat<4, 4, T, P> Rotate(uninitialize);
 		Rotate[0][0] = c + temp[0] * axis[0];
 		Rotate[0][0] = c + temp[0] * axis[0];
 		Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
 		Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
 		Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
 		Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
@@ -32,7 +32,7 @@ namespace glm
 		Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
 		Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
 		Rotate[2][2] = c + temp[2] * axis[2];
 		Rotate[2][2] = c + temp[2] * axis[2];
 
 
-		tmat4x4<T, P> Result(uninitialize);
+		mat<4, 4, T, P> Result(uninitialize);
 		Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
 		Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
 		Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
 		Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
 		Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
 		Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];

+ 1 - 1
glm/gtx/rotate_vector.hpp

@@ -111,7 +111,7 @@ namespace glm
 	//! Build a rotation matrix from a normal and a up vector.
 	//! Build a rotation matrix from a normal and a up vector.
 	//! From GLM_GTX_rotate_vector extension.
 	//! From GLM_GTX_rotate_vector extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> orientation(
+	GLM_FUNC_DECL mat<4, 4, T, P> orientation(
 		vec<3, T, P> const & Normal,
 		vec<3, T, P> const & Normal,
 		vec<3, T, P> const & Up);
 		vec<3, T, P> const & Up);
 
 

+ 3 - 3
glm/gtx/rotate_vector.inl

@@ -49,7 +49,7 @@ namespace glm
 		vec<3, T, P> const & normal
 		vec<3, T, P> const & normal
 	)
 	)
 	{
 	{
-		return tmat3x3<T, P>(glm::rotate(angle, normal)) * v;
+		return mat<3, 3, T, P>(glm::rotate(angle, normal)) * v;
 	}
 	}
 	/*
 	/*
 	template <typename T, precision P>
 	template <typename T, precision P>
@@ -171,14 +171,14 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> orientation
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> orientation
 	(
 	(
 		vec<3, T, P> const & Normal,
 		vec<3, T, P> const & Normal,
 		vec<3, T, P> const & Up
 		vec<3, T, P> const & Up
 	)
 	)
 	{
 	{
 		if(all(equal(Normal, Up)))
 		if(all(equal(Normal, Up)))
-			return tmat4x4<T, P>(T(1));
+			return mat<4, 4, T, P>(T(1));
 
 
 		vec<3, T, P> RotationAxis = cross(Up, Normal);
 		vec<3, T, P> RotationAxis = cross(Up, Normal);
 		T Angle = acos(dot(Normal, Up));
 		T Angle = acos(dot(Normal, Up));

+ 18 - 18
glm/gtx/string_cast.inl

@@ -237,9 +237,9 @@ namespace detail
 
 
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat2x2<T, P> >
+	struct compute_to_string<mat<2, 2, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat2x2<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<2, 2, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -255,9 +255,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat2x3<T, P> >
+	struct compute_to_string<mat<2, 3, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat2x3<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<2, 3, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -273,9 +273,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat2x4<T, P> >
+	struct compute_to_string<mat<2, 4, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat2x4<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<2, 4, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -291,9 +291,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat3x2<T, P> >
+	struct compute_to_string<mat<3, 2, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat3x2<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<3, 2, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -311,9 +311,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat3x3<T, P> >
+	struct compute_to_string<mat<3, 3, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat3x3<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<3, 3, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -331,9 +331,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat3x4<T, P> >
+	struct compute_to_string<mat<3, 4, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat3x4<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<3, 4, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -351,9 +351,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat4x2<T, P> >
+	struct compute_to_string<mat<4, 2, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat4x2<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<4, 2, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -373,9 +373,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat4x3<T, P> >
+	struct compute_to_string<mat<4, 3, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat4x3<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<4, 3, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
@@ -395,9 +395,9 @@ namespace detail
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct compute_to_string<tmat4x4<T, P> >
+	struct compute_to_string<mat<4, 4, T, P> >
 	{
 	{
-		GLM_FUNC_QUALIFIER static std::string call(tmat4x4<T, P> const & x)
+		GLM_FUNC_QUALIFIER static std::string call(mat<4, 4, T, P> const & x)
 		{
 		{
 			char const * PrefixStr = prefix<T>::value();
 			char const * PrefixStr = prefix<T>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
 			char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();

+ 3 - 3
glm/gtx/transform.hpp

@@ -36,14 +36,14 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see gtx_transform
 	/// @see gtx_transform
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> translate(
+	GLM_FUNC_DECL mat<4, 4, T, P> translate(
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 
 
 	/// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians. 
 	/// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians. 
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see gtx_transform
 	/// @see gtx_transform
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> rotate(
+	GLM_FUNC_DECL mat<4, 4, T, P> rotate(
 		T angle, 
 		T angle, 
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 
 
@@ -51,7 +51,7 @@ namespace glm
 	/// @see gtc_matrix_transform
 	/// @see gtc_matrix_transform
 	/// @see gtx_transform
 	/// @see gtx_transform
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat4x4<T, P> scale(
+	GLM_FUNC_DECL mat<4, 4, T, P> scale(
 		vec<3, T, P> const & v);
 		vec<3, T, P> const & v);
 
 
 	/// @}
 	/// @}

+ 6 - 6
glm/gtx/transform.inl

@@ -4,21 +4,21 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> translate(vec<3, T, P> const & v)
 	{
 	{
-		return translate(tmat4x4<T, P>(static_cast<T>(1)), v);
+		return translate(mat<4, 4, T, P>(static_cast<T>(1)), v);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(T angle, vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate(T angle, vec<3, T, P> const & v)
 	{
 	{
-		return rotate(tmat4x4<T, P>(static_cast<T>(1)), angle, v);
+		return rotate(mat<4, 4, T, P>(static_cast<T>(1)), angle, v);
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(vec<3, T, P> const & v)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(vec<3, T, P> const & v)
 	{
 	{
-		return scale(tmat4x4<T, P>(static_cast<T>(1)), v);
+		return scale(mat<4, 4, T, P>(static_cast<T>(1)), v);
 	}
 	}
 
 
 }//namespace glm
 }//namespace glm

+ 20 - 20
glm/gtx/transform2.hpp

@@ -33,75 +33,75 @@ namespace glm
 	//! Transforms a matrix with a shearing on X axis.
 	//! Transforms a matrix with a shearing on X axis.
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_DECL tmat3x3<T, P> shearX2D(
-		tmat3x3<T, P> const & m, 
+	GLM_FUNC_DECL mat<3, 3, T, P> shearX2D(
+		mat<3, 3, T, P> const& m, 
 		T y);
 		T y);
 
 
 	//! Transforms a matrix with a shearing on Y axis.
 	//! Transforms a matrix with a shearing on Y axis.
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat3x3<T, P> shearY2D(
-		tmat3x3<T, P> const & m, 
+	GLM_FUNC_DECL mat<3, 3, T, P> shearY2D(
+		mat<3, 3, T, P> const& m, 
 		T x);
 		T x);
 
 
 	//! Transforms a matrix with a shearing on X axis
 	//! Transforms a matrix with a shearing on X axis
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat4x4<T, P> shearX3D(
-		const tmat4x4<T, P> & m,
+	GLM_FUNC_DECL mat<4, 4, T, P> shearX3D(
+		const mat<4, 4, T, P> & m,
 		T y, 
 		T y, 
 		T z);
 		T z);
 
 
 	//! Transforms a matrix with a shearing on Y axis.
 	//! Transforms a matrix with a shearing on Y axis.
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat4x4<T, P> shearY3D(
-		const tmat4x4<T, P> & m, 
+	GLM_FUNC_DECL mat<4, 4, T, P> shearY3D(
+		const mat<4, 4, T, P> & m, 
 		T x, 
 		T x, 
 		T z);
 		T z);
 
 
 	//! Transforms a matrix with a shearing on Z axis. 
 	//! Transforms a matrix with a shearing on Z axis. 
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat4x4<T, P> shearZ3D(
-		const tmat4x4<T, P> & m, 
+	GLM_FUNC_DECL mat<4, 4, T, P> shearZ3D(
+		const mat<4, 4, T, P> & m, 
 		T x, 
 		T x, 
 		T y);
 		T y);
 
 
-	//template <typename T> GLM_FUNC_QUALIFIER tmat4x4<T, P> shear(const tmat4x4<T, P> & m, shearPlane, planePoint, angle)
+	//template <typename T> GLM_FUNC_QUALIFIER mat<4, 4, T, P> shear(const mat<4, 4, T, P> & m, shearPlane, planePoint, angle)
 	// Identity + tan(angle) * cross(Normal, OnPlaneVector)     0
 	// Identity + tan(angle) * cross(Normal, OnPlaneVector)     0
 	// - dot(PointOnPlane, normal) * OnPlaneVector              1
 	// - dot(PointOnPlane, normal) * OnPlaneVector              1
 
 
 	// Reflect functions seem to don't work
 	// Reflect functions seem to don't work
-	//template <typename T> tmat3x3<T, P> reflect2D(const tmat3x3<T, P> & m, const vec<3, T, P>& normal){return reflect2DGTX(m, normal);}									//!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
-	//template <typename T> tmat4x4<T, P> reflect3D(const tmat4x4<T, P> & m, const vec<3, T, P>& normal){return reflect3DGTX(m, normal);}									//!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
+	//template <typename T> mat<3, 3, T, P> reflect2D(const mat<3, 3, T, P> & m, const vec<3, T, P>& normal){return reflect2DGTX(m, normal);}									//!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
+	//template <typename T> mat<4, 4, T, P> reflect3D(const mat<4, 4, T, P> & m, const vec<3, T, P>& normal){return reflect3DGTX(m, normal);}									//!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
 		
 		
 	//! Build planar projection matrix along normal axis.
 	//! Build planar projection matrix along normal axis.
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat3x3<T, P> proj2D(
-		const tmat3x3<T, P> & m, 
+	GLM_FUNC_DECL mat<3, 3, T, P> proj2D(
+		const mat<3, 3, T, P> & m, 
 		const vec<3, T, P>& normal);
 		const vec<3, T, P>& normal);
 
 
 	//! Build planar projection matrix along normal axis.
 	//! Build planar projection matrix along normal axis.
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_DECL tmat4x4<T, P> proj3D(
-		const tmat4x4<T, P> & m, 
+	GLM_FUNC_DECL mat<4, 4, T, P> proj3D(
+		const mat<4, 4, T, P> & m, 
 		const vec<3, T, P>& normal);
 		const vec<3, T, P>& normal);
 
 
 	//! Build a scale bias matrix. 
 	//! Build a scale bias matrix. 
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename valType, precision P> 
 	template <typename valType, precision P> 
-	GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
+	GLM_FUNC_DECL mat<4, 4, valType, P> scaleBias(
 		valType scale, 
 		valType scale, 
 		valType bias);
 		valType bias);
 
 
 	//! Build a scale bias matrix.
 	//! Build a scale bias matrix.
 	//! From GLM_GTX_transform2 extension.
 	//! From GLM_GTX_transform2 extension.
 	template <typename valType, precision P> 
 	template <typename valType, precision P> 
-	GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
-		tmat4x4<valType, P> const & m, 
+	GLM_FUNC_DECL mat<4, 4, valType, P> scaleBias(
+		mat<4, 4, valType, P> const & m, 
 		valType scale, 
 		valType scale, 
 		valType bias);
 		valType bias);
 
 

+ 23 - 23
glm/gtx/transform2.inl

@@ -4,52 +4,52 @@
 namespace glm
 namespace glm
 {
 {
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D(tmat3x3<T, P> const& m, T s)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> shearX2D(mat<3, 3, T, P> const& m, T s)
 	{
 	{
-		tmat3x3<T, P> r(1);
+		mat<3, 3, T, P> r(1);
 		r[1][0] = s;
 		r[1][0] = s;
 		return m * r;
 		return m * r;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D(tmat3x3<T, P> const& m, T s)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> shearY2D(mat<3, 3, T, P> const& m, T s)
 	{
 	{
-		tmat3x3<T, P> r(1);
+		mat<3, 3, T, P> r(1);
 		r[0][1] = s;
 		r[0][1] = s;
 		return m * r;
 		return m * r;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D(tmat4x4<T, P> const& m, T s, T t)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> shearX3D(mat<4, 4, T, P> const& m, T s, T t)
 	{
 	{
-		tmat4x4<T, P> r(1);
+		mat<4, 4, T, P> r(1);
 		r[0][1] = s;
 		r[0][1] = s;
 		r[0][2] = t;
 		r[0][2] = t;
 		return m * r;
 		return m * r;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D(tmat4x4<T, P> const& m, T s, T t)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> shearY3D(mat<4, 4, T, P> const& m, T s, T t)
 	{
 	{
-		tmat4x4<T, P> r(1);
+		mat<4, 4, T, P> r(1);
 		r[1][0] = s;
 		r[1][0] = s;
 		r[1][2] = t;
 		r[1][2] = t;
 		return m * r;
 		return m * r;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D(tmat4x4<T, P> const& m, T s, T t)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> shearZ3D(mat<4, 4, T, P> const& m, T s, T t)
 	{
 	{
-		tmat4x4<T, P> r(1);
+		mat<4, 4, T, P> r(1);
 		r[2][0] = s;
 		r[2][0] = s;
 		r[2][1] = t;
 		r[2][1] = t;
 		return m * r;
 		return m * r;
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D(tmat3x3<T, P> const& m, vec<3, T, P> const& normal)
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> reflect2D(mat<3, 3, T, P> const& m, vec<3, T, P> const& normal)
 	{
 	{
-		tmat3x3<T, P> r(static_cast<T>(1));
+		mat<3, 3, T, P> r(static_cast<T>(1));
 		r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x;
 		r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x;
 		r[0][1] = -static_cast<T>(2) * normal.x * normal.y;
 		r[0][1] = -static_cast<T>(2) * normal.x * normal.y;
 		r[1][0] = -static_cast<T>(2) * normal.x * normal.y;
 		r[1][0] = -static_cast<T>(2) * normal.x * normal.y;
@@ -58,9 +58,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D(tmat4x4<T, P> const& m, vec<3, T, P> const& normal)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> reflect3D(mat<4, 4, T, P> const& m, vec<3, T, P> const& normal)
 	{
 	{
-		tmat4x4<T, P> r(static_cast<T>(1));
+		mat<4, 4, T, P> r(static_cast<T>(1));
 		r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x;
 		r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x;
 		r[0][1] = -static_cast<T>(2) * normal.x * normal.y;
 		r[0][1] = -static_cast<T>(2) * normal.x * normal.y;
 		r[0][2] = -static_cast<T>(2) * normal.x * normal.z;
 		r[0][2] = -static_cast<T>(2) * normal.x * normal.z;
@@ -76,11 +76,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat3x3<T, P> proj2D(
-		const tmat3x3<T, P>& m, 
+	GLM_FUNC_QUALIFIER mat<3, 3, T, P> proj2D(
+		const mat<3, 3, T, P>& m, 
 		const vec<3, T, P>& normal)
 		const vec<3, T, P>& normal)
 	{
 	{
-		tmat3x3<T, P> r(static_cast<T>(1));
+		mat<3, 3, T, P> r(static_cast<T>(1));
 		r[0][0] = static_cast<T>(1) - normal.x * normal.x;
 		r[0][0] = static_cast<T>(1) - normal.x * normal.x;
 		r[0][1] = - normal.x * normal.y;
 		r[0][1] = - normal.x * normal.y;
 		r[1][0] = - normal.x * normal.y;
 		r[1][0] = - normal.x * normal.y;
@@ -89,11 +89,11 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> proj3D(
-		const tmat4x4<T, P>& m, 
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> proj3D(
+		const mat<4, 4, T, P>& m, 
 		const vec<3, T, P>& normal)
 		const vec<3, T, P>& normal)
 	{
 	{
-		tmat4x4<T, P> r(static_cast<T>(1));
+		mat<4, 4, T, P> r(static_cast<T>(1));
 		r[0][0] = static_cast<T>(1) - normal.x * normal.x;
 		r[0][0] = static_cast<T>(1) - normal.x * normal.x;
 		r[0][1] = - normal.x * normal.y;
 		r[0][1] = - normal.x * normal.y;
 		r[0][2] = - normal.x * normal.z;
 		r[0][2] = - normal.x * normal.z;
@@ -107,9 +107,9 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(T scale, T bias)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> scaleBias(T scale, T bias)
 	{
 	{
-		tmat4x4<T, P> result;
+		mat<4, 4, T, P> result;
 		result[3] = vec<4, T, P>(vec<3, T, P>(bias), static_cast<T>(1));
 		result[3] = vec<4, T, P>(vec<3, T, P>(bias), static_cast<T>(1));
 		result[0][0] = scale;
 		result[0][0] = scale;
 		result[1][1] = scale;
 		result[1][1] = scale;
@@ -118,7 +118,7 @@ namespace glm
 	}
 	}
 
 
 	template <typename T, precision P> 
 	template <typename T, precision P> 
-	GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(tmat4x4<T, P> const& m, T scale, T bias)
+	GLM_FUNC_QUALIFIER mat<4, 4, T, P> scaleBias(mat<4, 4, T, P> const& m, T scale, T bias)
 	{
 	{
 		return m * scaleBias(scale, bias);
 		return m * scaleBias(scale, bias);
 	}
 	}

+ 9 - 9
glm/gtx/type_trait.hpp

@@ -65,7 +65,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat2x2<T, P>>
+	struct type<mat<2, 2, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -79,7 +79,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat2x3<T, P>>
+	struct type<mat<2, 3, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -93,7 +93,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat2x4<T, P>>
+	struct type<mat<2, 4, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -107,7 +107,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat3x2<T, P>>
+	struct type<mat<3, 2, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -121,7 +121,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat3x3<T, P>>
+	struct type<mat<3, 3, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -135,7 +135,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat3x4<T, P>>
+	struct type<mat<3, 4, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -149,7 +149,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat4x2<T, P>>
+	struct type<mat<4, 2, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -163,7 +163,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat4x3<T, P>>
+	struct type<mat<4, 3, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;
@@ -177,7 +177,7 @@ namespace glm
 	};
 	};
 
 
 	template <typename T, precision P>
 	template <typename T, precision P>
-	struct type<tmat4x4<T, P>>
+	struct type<mat<4, 4, T, P>>
 	{
 	{
 		static bool const is_vec = false;
 		static bool const is_vec = false;
 		static bool const is_mat = true;
 		static bool const is_mat = true;

+ 6 - 6
glm/mat2x2.hpp

@@ -12,41 +12,41 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, lowp>		lowp_mat2;
+	typedef mat<2, 2, float, lowp>		lowp_mat2;
 	
 	
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, mediump>		mediump_mat2;
+	typedef mat<2, 2, float, mediump>		mediump_mat2;
 	
 	
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, highp>		highp_mat2;
+	typedef mat<2, 2, float, highp>		highp_mat2;
 	
 	
 	/// 2 columns of 2 components matrix of low precision floating-point numbers.
 	/// 2 columns of 2 components matrix of low precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, lowp>		lowp_mat2x2;
+	typedef mat<2, 2, float, lowp>		lowp_mat2x2;
 	
 	
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, mediump>		mediump_mat2x2;
+	typedef mat<2, 2, float, mediump>		mediump_mat2x2;
 	
 	
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// 2 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x2<float, highp>		highp_mat2x2;
+	typedef mat<2, 2, float, highp>		highp_mat2x2;
 
 
 }//namespace glm
 }//namespace glm

+ 3 - 3
glm/mat2x3.hpp

@@ -12,21 +12,21 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<float, lowp>		lowp_mat2x3;
+	typedef mat<2, 3, float, lowp>		lowp_mat2x3;
 
 
 	/// 2 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<float, mediump>		mediump_mat2x3;
+	typedef mat<2, 3, float, mediump>		mediump_mat2x3;
 
 
 	/// 2 columns of 3 components matrix of high precision floating-point numbers.
 	/// 2 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x3<float, highp>		highp_mat2x3;
+	typedef mat<2, 3, float, highp>		highp_mat2x3;
 
 
 }//namespace glm
 }//namespace glm
 
 

+ 3 - 3
glm/mat2x4.hpp

@@ -12,20 +12,20 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<float, lowp>		lowp_mat2x4;
+	typedef mat<2, 4, float, lowp>		lowp_mat2x4;
 	
 	
 	/// 2 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 2 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<float, mediump>		mediump_mat2x4;
+	typedef mat<2, 4, float, mediump>		mediump_mat2x4;
 	
 	
 	/// 2 columns of 4 components matrix of high precision floating-point numbers.
 	/// 2 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat2x4<float, highp>		highp_mat2x4;
+	typedef mat<2, 4, float, highp>		highp_mat2x4;
 
 
 }//namespace glm
 }//namespace glm

+ 3 - 3
glm/mat3x2.hpp

@@ -12,20 +12,20 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<float, lowp>		lowp_mat3x2;
+	typedef mat<3, 2, float, lowp>		lowp_mat3x2;
 	
 	
 	/// 3 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<float, mediump>		mediump_mat3x2;
+	typedef mat<3, 2, float, mediump>		mediump_mat3x2;
 	
 	
 	/// 3 columns of 2 components matrix of high precision floating-point numbers.
 	/// 3 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x2<float, highp>		highp_mat3x2;
+	typedef mat<3, 2, float, highp>		highp_mat3x2;
 
 
 }//namespace
 }//namespace

+ 6 - 6
glm/mat3x3.hpp

@@ -12,41 +12,41 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, lowp>		lowp_mat3;
+	typedef mat<3, 3, float, lowp>		lowp_mat3;
 	
 	
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, mediump>		mediump_mat3;
+	typedef mat<3, 3, float, mediump>		mediump_mat3;
 	
 	
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, highp>		highp_mat3;
+	typedef mat<3, 3, float, highp>		highp_mat3;
 	
 	
 	/// 3 columns of 3 components matrix of low precision floating-point numbers.
 	/// 3 columns of 3 components matrix of low precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, lowp>		lowp_mat3x3;
+	typedef mat<3, 3, float, lowp>		lowp_mat3x3;
 	
 	
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, mediump>		mediump_mat3x3;
+	typedef mat<3, 3, float, mediump>		mediump_mat3x3;
 	
 	
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// 3 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x3<float, highp>		highp_mat3x3;
+	typedef mat<3, 3, float, highp>		highp_mat3x3;
 
 
 }//namespace glm
 }//namespace glm

+ 3 - 3
glm/mat3x4.hpp

@@ -12,20 +12,20 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<float, lowp>		lowp_mat3x4;
+	typedef mat<3, 4, float, lowp>		lowp_mat3x4;
 	
 	
 	/// 3 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 3 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<float, mediump>		mediump_mat3x4;
+	typedef mat<3, 4, float, mediump>		mediump_mat3x4;
 	
 	
 	/// 3 columns of 4 components matrix of high precision floating-point numbers.
 	/// 3 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat3x4<float, highp>		highp_mat3x4;
+	typedef mat<3, 4, float, highp>		highp_mat3x4;
 
 
 }//namespace glm
 }//namespace glm

+ 3 - 3
glm/mat4x2.hpp

@@ -12,20 +12,20 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<float, lowp>		lowp_mat4x2;
+	typedef mat<4, 2, float, lowp>		lowp_mat4x2;
 	
 	
 	/// 4 columns of 2 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 2 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<float, mediump>		mediump_mat4x2;
+	typedef mat<4, 2, float, mediump>		mediump_mat4x2;
 	
 	
 	/// 4 columns of 2 components matrix of high precision floating-point numbers.
 	/// 4 columns of 2 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x2<float, highp>		highp_mat4x2;
+	typedef mat<4, 2, float, highp>		highp_mat4x2;
 
 
 }//namespace glm
 }//namespace glm

+ 3 - 3
glm/mat4x3.hpp

@@ -12,20 +12,20 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<float, lowp>		lowp_mat4x3;
+	typedef mat<4, 3, float, lowp>		lowp_mat4x3;
 	
 	
 	/// 4 columns of 3 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 3 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<float, mediump>		mediump_mat4x3;
+	typedef mat<4, 3, float, mediump>		mediump_mat4x3;
 	
 	
 	/// 4 columns of 3 components matrix of high precision floating-point numbers.
 	/// 4 columns of 3 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x3<float, highp>		highp_mat4x3;
+	typedef mat<4, 3, float, highp>		highp_mat4x3;
 
 
 }//namespace glm
 }//namespace glm

+ 6 - 6
glm/mat4x4.hpp

@@ -12,41 +12,41 @@ namespace glm
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, lowp>		lowp_mat4;
+	typedef mat<4, 4, float, lowp>		lowp_mat4;
 	
 	
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, mediump>		mediump_mat4;
+	typedef mat<4, 4, float, mediump>		mediump_mat4;
 	
 	
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, highp>		highp_mat4;
+	typedef mat<4, 4, float, highp>		highp_mat4;
 	
 	
 	/// 4 columns of 4 components matrix of low precision floating-point numbers.
 	/// 4 columns of 4 components matrix of low precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, lowp>		lowp_mat4x4;
+	typedef mat<4, 4, float, lowp>		lowp_mat4x4;
 	
 	
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// 4 columns of 4 components matrix of medium precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, mediump>		mediump_mat4x4;
+	typedef mat<4, 4, float, mediump>		mediump_mat4x4;
 	
 	
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// 4 columns of 4 components matrix of high precision floating-point numbers.
 	/// There is no guarantee on the actual precision.
 	/// There is no guarantee on the actual precision.
 	///
 	///
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
 	/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
-	typedef tmat4x4<float, highp>		highp_mat4x4;
+	typedef mat<4, 4, float, highp>		highp_mat4x4;
 
 
 }//namespace glm
 }//namespace glm

+ 1 - 1
glm/simd/matrix.h

@@ -1008,7 +1008,7 @@ GLM_FUNC_QUALIFIER void glm_mat4_rotate(__m128 const in[4], float Angle, float c
 	Result[2] = TmpC4;
 	Result[2] = TmpC4;
 	Result[3] = _mm_set_ps(1, 0, 0, 0);
 	Result[3] = _mm_set_ps(1, 0, 0, 0);
 
 
-	//tmat4x4<valType> Result(uninitialize);
+	//mat<4, 4, valType> Result(uninitialize);
 	//Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
 	//Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
 	//Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
 	//Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
 	//Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
 	//Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];

+ 27 - 27
test/gtx/gtx_io.cpp

@@ -38,15 +38,15 @@ namespace
 		else if (typeid(T) == typeid(glm::vec<2, U,P>))   { ostr << "vec2"; }
 		else if (typeid(T) == typeid(glm::vec<2, U,P>))   { ostr << "vec2"; }
 		else if (typeid(T) == typeid(glm::vec<3, U,P>))   { ostr << "vec3"; }
 		else if (typeid(T) == typeid(glm::vec<3, U,P>))   { ostr << "vec3"; }
 		else if (typeid(T) == typeid(glm::vec<4, U,P>))   { ostr << "vec4"; }
 		else if (typeid(T) == typeid(glm::vec<4, U,P>))   { ostr << "vec4"; }
-		else if (typeid(T) == typeid(glm::tmat2x2<U,P>)) { ostr << "mat2x2"; }
-		else if (typeid(T) == typeid(glm::tmat2x3<U,P>)) { ostr << "mat2x3"; }
-		else if (typeid(T) == typeid(glm::tmat2x4<U,P>)) { ostr << "mat2x4"; }
-		else if (typeid(T) == typeid(glm::tmat3x2<U,P>)) { ostr << "mat3x2"; }
-		else if (typeid(T) == typeid(glm::tmat3x3<U,P>)) { ostr << "mat3x3"; }
-		else if (typeid(T) == typeid(glm::tmat3x4<U,P>)) { ostr << "mat3x4"; }
-		else if (typeid(T) == typeid(glm::tmat4x2<U,P>)) { ostr << "mat4x2"; }
-		else if (typeid(T) == typeid(glm::tmat4x3<U,P>)) { ostr << "mat4x3"; }
-		else if (typeid(T) == typeid(glm::tmat4x4<U,P>)) { ostr << "mat4x4"; }
+		else if (typeid(T) == typeid(glm::mat<2, 2, U,P>)) { ostr << "mat2x2"; }
+		else if (typeid(T) == typeid(glm::mat<2, 3, U,P>)) { ostr << "mat2x3"; }
+		else if (typeid(T) == typeid(glm::mat<2, 4, U,P>)) { ostr << "mat2x4"; }
+		else if (typeid(T) == typeid(glm::mat<3, 2, U,P>)) { ostr << "mat3x2"; }
+		else if (typeid(T) == typeid(glm::mat<3, 3, U,P>)) { ostr << "mat3x3"; }
+		else if (typeid(T) == typeid(glm::mat<3, 4, U,P>)) { ostr << "mat3x4"; }
+		else if (typeid(T) == typeid(glm::mat<4, 2, U,P>)) { ostr << "mat4x2"; }
+		else if (typeid(T) == typeid(glm::mat<4, 3, U,P>)) { ostr << "mat4x3"; }
+		else if (typeid(T) == typeid(glm::mat<4, 4, U,P>)) { ostr << "mat4x4"; }
 		else                                             { ostr << "unknown"; }
 		else                                             { ostr << "unknown"; }
 
 
 		ostr << '<' << typeid(U).name() << ',' << P << '>';
 		ostr << '<' << typeid(U).name() << ',' << P << '>';
@@ -124,27 +124,27 @@ int test_io_mat(OS& os, glm::io::order_type otype)
 
 
 	os << glm::io::precision(2) << glm::io::width(1 + 2 + 1 + 2)
 	os << glm::io::precision(2) << glm::io::width(1 + 2 + 1 + 2)
 		<< glm::io::order(otype)
 		<< glm::io::order(otype)
-		<< "mat2x2<" << typeid(T).name() << ',' << P << ">: " << glm::tmat2x2<T,P>(v2_1, v2_2) << '\n'
-		<< "mat2x3<" << typeid(T).name() << ',' << P << ">: " << glm::tmat2x3<T,P>(v3_1, v3_2) << '\n'
-		<< "mat2x4<" << typeid(T).name() << ',' << P << ">: " << glm::tmat2x4<T,P>(v4_1, v4_2) << '\n'
-		<< "mat3x2<" << typeid(T).name() << ',' << P << ">: " << glm::tmat3x2<T,P>(v2_1, v2_2, v2_3) << '\n'
-		<< "mat3x3<" << typeid(T).name() << ',' << P << ">: " << glm::tmat3x3<T,P>(v3_1, v3_2, v3_3) << '\n'
-		<< "mat3x4<" << typeid(T).name() << ',' << P << ">: " << glm::tmat3x4<T,P>(v4_1, v4_2, v4_3) << '\n'
-		<< "mat4x2<" << typeid(T).name() << ',' << P << ">: " << glm::tmat4x2<T,P>(v2_1, v2_2, v2_3, v2_4) << '\n'
-		<< "mat4x3<" << typeid(T).name() << ',' << P << ">: " << glm::tmat4x3<T,P>(v3_1, v3_2, v3_3, v3_4) << '\n'
-		<< "mat4x4<" << typeid(T).name() << ',' << P << ">: " << glm::tmat4x4<T,P>(v4_1, v4_2, v4_3, v4_4) << '\n';
+		<< "mat2x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 2, T,P>(v2_1, v2_2) << '\n'
+		<< "mat2x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 3, T,P>(v3_1, v3_2) << '\n'
+		<< "mat2x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 4, T,P>(v4_1, v4_2) << '\n'
+		<< "mat3x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 2, T,P>(v2_1, v2_2, v2_3) << '\n'
+		<< "mat3x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 3, T,P>(v3_1, v3_2, v3_3) << '\n'
+		<< "mat3x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 4, T,P>(v4_1, v4_2, v4_3) << '\n'
+		<< "mat4x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 2, T,P>(v2_1, v2_2, v2_3, v2_4) << '\n'
+		<< "mat4x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 3, T,P>(v3_1, v3_2, v3_3, v3_4) << '\n'
+		<< "mat4x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 4, T,P>(v4_1, v4_2, v4_3, v4_4) << '\n';
 
 
 	os << glm::io::unformatted
 	os << glm::io::unformatted
 		<< glm::io::order(otype)
 		<< glm::io::order(otype)
-		<< "mat2x2<" << typeid(T).name() << ',' << P << ">: " << glm::tmat2x2<T,P>(v2_1, v2_2) << '\n'
-		<< "mat2x3<" << typeid(T).name() << ',' << P << ">: " << glm::tmat2x3<T,P>(v3_1, v3_2) << '\n'
-		<< "mat2x4<" << typeid(T).name() << ',' << P << ">: " << glm::tmat2x4<T,P>(v4_1, v4_2) << '\n'
-		<< "mat3x2<" << typeid(T).name() << ',' << P << ">: " << glm::tmat3x2<T,P>(v2_1, v2_2, v2_3) << '\n'
-		<< "mat3x3<" << typeid(T).name() << ',' << P << ">: " << glm::tmat3x3<T,P>(v3_1, v3_2, v3_3) << '\n'
-		<< "mat3x4<" << typeid(T).name() << ',' << P << ">: " << glm::tmat3x4<T,P>(v4_1, v4_2, v4_3) << '\n'
-		<< "mat4x2<" << typeid(T).name() << ',' << P << ">: " << glm::tmat4x2<T,P>(v2_1, v2_2, v2_3, v2_4) << '\n'
-		<< "mat4x3<" << typeid(T).name() << ',' << P << ">: " << glm::tmat4x3<T,P>(v3_1, v3_2, v3_3, v3_4) << '\n'
-		<< "mat4x4<" << typeid(T).name() << ',' << P << ">: " << glm::tmat4x4<T,P>(v4_1, v4_2, v4_3, v4_4) << '\n';
+		<< "mat2x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 2, T,P>(v2_1, v2_2) << '\n'
+		<< "mat2x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 3, T,P>(v3_1, v3_2) << '\n'
+		<< "mat2x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<2, 4, T,P>(v4_1, v4_2) << '\n'
+		<< "mat3x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 2, T,P>(v2_1, v2_2, v2_3) << '\n'
+		<< "mat3x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 3, T,P>(v3_1, v3_2, v3_3) << '\n'
+		<< "mat3x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<3, 4, T,P>(v4_1, v4_2, v4_3) << '\n'
+		<< "mat4x2<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 2, T,P>(v2_1, v2_2, v2_3, v2_4) << '\n'
+		<< "mat4x3<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 3, T,P>(v3_1, v3_2, v3_3, v3_4) << '\n'
+		<< "mat4x4<" << typeid(T).name() << ',' << P << ">: " << glm::mat<4, 4, T,P>(v4_1, v4_2, v4_3, v4_4) << '\n';
   
   
 	return 0;
 	return 0;
 }
 }