Browse Source

Fixed declaration / definision mismatch

Christophe Riccio 15 years ago
parent
commit
c13515fb22
3 changed files with 33 additions and 32 deletions
  1. 8 8
      glm/core/type_mat2x2.inl
  2. 10 10
      glm/core/type_mat3x3.inl
  3. 15 14
      glm/core/type_mat4x4.inl

+ 8 - 8
glm/core/type_mat2x2.inl

@@ -449,10 +449,10 @@ namespace detail
     }
 
     template <typename T> 
-    inline typename tmat2x2<T>::row_type operator* 
+    inline typename tmat2x2<T>::col_type operator* 
 	(
 		tmat2x2<T> const & m, 
-		typename tmat2x2<T>::col_type const & v
+		typename tmat2x2<T>::row_type const & v
 	)
     {
         return detail::tvec2<T>(
@@ -461,9 +461,9 @@ namespace detail
     }
 
     template <typename T> 
-    inline typename tmat2x2<T>::col_type operator* 
+    inline typename tmat2x2<T>::row_type operator* 
 	(
-		typename tmat2x2<T>::row_type const & v, 
+		typename tmat2x2<T>::col_type const & v, 
 		tmat2x2<T> const & m
 	)
     {
@@ -511,19 +511,19 @@ namespace detail
     }
 
     template <typename T> 
-    inline typename tmat2x2<T>::row_type operator/ 
+    inline typename tmat2x2<T>::col_type operator/ 
 	(
 		tmat2x2<T> const & m, 
-		typename tmat2x2<T>::col_type & v
+		typename tmat2x2<T>::row_type & v
 	)
     {
         return m._inverse() * v;
     }
 
     template <typename T> 
-    inline typename tmat2x2<T>::col_type operator/ 
+    inline typename tmat2x2<T>::row_type operator/ 
 	(
-		typename tmat2x2<T>::row_type const & v,
+		typename tmat2x2<T>::col_type const & v,
 		tmat2x2<T> const & m
 	)
     {

+ 10 - 10
glm/core/type_mat3x3.inl

@@ -505,26 +505,26 @@ namespace detail
     }
 
     template <typename T> 
-    inline typename tmat3x3<T>::row_type operator* 
+    inline typename tmat3x3<T>::col_type operator* 
 	(
 		tmat3x3<T> const & m, 
-		typename tmat3x3<T>::col_type const & v
+		typename tmat3x3<T>::row_type const & v
 	)
     {
-        return typename tmat3x3<T>::row_type(
+        return typename tmat3x3<T>::col_type(
             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][2] * v.x + m[1][2] * v.y + m[2][2] * v.z);
     }
 
     template <typename T> 
-    inline typename tmat3x3<T>::col_type operator* 
+    inline typename tmat3x3<T>::row_type operator* 
 	(
-		typename tmat3x3<T>::row_type const & v, 
+		typename tmat3x3<T>::col_type const & v, 
 		tmat3x3<T> const & m
 	)
     {
-        return typename tmat3x3<T>::col_type(
+        return typename tmat3x3<T>::row_type(
             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[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z);
@@ -598,19 +598,19 @@ namespace detail
     }
 
 	template <typename T> 
-	inline typename tmat3x3<T>::row_type operator/ 
+	inline typename tmat3x3<T>::col_type operator/ 
 	(
 		tmat3x3<T> const & m, 
-		typename tmat3x3<T>::col_type const & v
+		typename tmat3x3<T>::row_type const & v
 	)
 	{
 		return m._inverse() * v;
 	}
 
 	template <typename T> 
-	inline typename tmat3x3<T>::col_type operator/ 
+	inline typename tmat3x3<T>::row_type operator/ 
 	(
-		typename tmat3x3<T>::row_type const & v, 
+		typename tmat3x3<T>::col_type const & v, 
 		tmat3x3<T> const & m
 	)
 	{

+ 15 - 14
glm/core/type_mat4x4.inl

@@ -435,10 +435,11 @@ namespace detail
             - (this->value[0][0] * SubFactor14 - this->value[0][1] * SubFactor16 + this->value[0][3] * SubFactor18),
             + (this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18));
 
-        value_type Determinant = this->value[0][0] * Inverse[0][0] 
-                      + this->value[0][1] * Inverse[1][0] 
-                      + this->value[0][2] * Inverse[2][0] 
-                      + this->value[0][3] * Inverse[3][0];
+        value_type Determinant = 
+			+ this->value[0][0] * Inverse[0][0] 
+			+ this->value[0][1] * Inverse[1][0] 
+			+ this->value[0][2] * Inverse[2][0] 
+			+ this->value[0][3] * Inverse[3][0];
 
         Inverse /= Determinant;
         return Inverse;
@@ -558,13 +559,13 @@ namespace detail
     }
 
     template <typename T> 
-    inline typename tmat4x4<T>::row_type operator* 
+    inline typename tmat4x4<T>::col_type operator* 
 	(
 		tmat4x4<T> const & m, 
-		typename tmat4x4<T>::col_type const & v
+		typename tmat4x4<T>::row_type const & v
 	)
     {
-        return typename tmat4x4<T>::row_type(
+        return typename tmat4x4<T>::col_type(
             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][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w,
@@ -572,13 +573,13 @@ namespace detail
     }
 
     template <typename T> 
-    inline typename tmat4x4<T>::col_type operator* 
+    inline typename tmat4x4<T>::row_type operator* 
 	(
-		typename tmat4x4<T>::row_type const & v, 
+		typename tmat4x4<T>::col_type const & v, 
 		tmat4x4<T> const & m
 	)
     {
-        return typename tmat4x4<T>::col_type(
+        return typename tmat4x4<T>::row_type(
             m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z + m[0][3] * v.w,
             m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z + m[1][3] * v.w,
             m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z + m[2][3] * v.w,
@@ -639,19 +640,19 @@ namespace detail
     }
 
     template <typename T> 
-    inline typename tmat4x4<T>::row_type operator/ 
+    inline typename tmat4x4<T>::col_type operator/ 
 	(
 		tmat4x4<T> const & m, 
-		typename tmat4x4<T>::col_type const & v
+		typename tmat4x4<T>::row_type const & v
 	)
     {
         return m._inverse() * v;
     }
 
     template <typename T> 
-    inline typename tmat4x4<T>::col_type operator/ 
+    inline typename tmat4x4<T>::row_type operator/ 
 	(
-		typename tmat4x4<T>::row_type const & v, 
+		typename tmat4x4<T>::col_type const & v, 
 		tmat4x4<T> const & m
 	)
     {