]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added identitymatrix const struct which can be used wherever
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 10 Aug 2004 02:10:12 +0000 (02:10 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 10 Aug 2004 02:10:12 +0000 (02:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4328 d7cf8633-e32d-0410-b094-e92efae38249

matrixlib.c
matrixlib.h

index a036d822053a494c8ae1d23058e7bfa54814e73e..550a511837d6981c196204e21f8d6618334bcea8 100644 (file)
@@ -2,6 +2,16 @@
 #include <math.h>
 #include "matrixlib.h"
 
+const matrix4x4_t identitymatrix =
+{
+       {
+               {1, 0, 0, 0},
+               {0, 1, 0, 0},
+               {0, 0, 1, 0},
+               {0, 0, 0, 1}
+       }
+};
+
 void Matrix4x4_Copy (matrix4x4_t *out, const matrix4x4_t *in)
 {
        *out = *in;
index 87b09f84dc123cb19bd30dae48c84a963ec4ac4d..06890e294b9171ff6d18bfa3f7e4ca4677ec69b0 100644 (file)
@@ -12,6 +12,8 @@ typedef struct matrix4x4_s
 }
 matrix4x4_t;
 
+extern const matrix4x4_t identitymatrix;
+
 // functions for manipulating 4x4 matrices
 
 // copy a matrix4x4