]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/SGMatrix.hxx
Modified Files:
[simgear.git] / simgear / math / SGMatrix.hxx
index 35cabc302bb16783ee9dad56c2c8c7f50dd1ab96..ed146038dc59b71dab43eb505e3467ad449ea710 100644 (file)
@@ -22,9 +22,6 @@
 template<typename T>
 struct TransNegRef;
 
-template<typename T>
-class SGMatrix;
-
 /// 3D Matrix Class
 template<typename T>
 class SGMatrix {
@@ -571,18 +568,14 @@ operator<<(std::basic_ostream<char_type, traits_type>& s, const SGMatrix<T>& m)
   return s;
 }
 
-/// Two classes doing actually the same on different types
-typedef SGMatrix<float> SGMatrixf;
-typedef SGMatrix<double> SGMatrixd;
-
 inline
 SGMatrixf
 toMatrixf(const SGMatrixd& m)
 {
   return SGMatrixf((float)m(0,0), (float)m(0,1), (float)m(0,2), (float)m(0,3),
                    (float)m(1,0), (float)m(1,1), (float)m(1,2), (float)m(1,3),
-                   (float)m(3,0), (float)m(2,1), (float)m(2,2), (float)m(2,3),
-                   (float)m(4,0), (float)m(4,1), (float)m(4,2), (float)m(4,3));
+                   (float)m(2,0), (float)m(2,1), (float)m(2,2), (float)m(2,3),
+                   (float)m(3,0), (float)m(3,1), (float)m(3,2), (float)m(3,3));
 }
 
 inline
@@ -591,8 +584,8 @@ toMatrixd(const SGMatrixf& m)
 {
   return SGMatrixd(m(0,0), m(0,1), m(0,2), m(0,3),
                    m(1,0), m(1,1), m(1,2), m(1,3),
-                   m(3,0), m(2,1), m(2,2), m(2,3),
-                   m(4,0), m(4,1), m(4,2), m(4,3));
+                   m(2,0), m(2,1), m(2,2), m(2,3),
+                   m(3,0), m(3,1), m(3,2), m(3,3));
 }
 
 #endif