summaryrefslogtreecommitdiffstats
path: root/sdl/math3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'sdl/math3d.c')
-rw-r--r--sdl/math3d.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sdl/math3d.c b/sdl/math3d.c
index 775dabd..3277ede 100644
--- a/sdl/math3d.c
+++ b/sdl/math3d.c
@@ -7,6 +7,7 @@
*/
#include <math.h>
+#include <stdio.h>
#include <string.h>
#include "math3d.h"
@@ -202,3 +203,23 @@ void m3dMatrixMultiply44f(M3DMatrix44f product, const M3DMatrix44f a,
#undef P
}
+void m3dPrintMatrix44f(const M3DMatrix44f m)
+{
+ int i, j;
+
+ #define M(row,col) m[col*4+row]
+
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ printf("%5.2f ", M(i, j));
+ }
+ puts("");
+ }
+
+ puts("");
+
+ #undef M
+}
+