summaryrefslogtreecommitdiff
path: root/micro/mat4.h
diff options
context:
space:
mode:
Diffstat (limited to 'micro/mat4.h')
-rw-r--r--micro/mat4.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/micro/mat4.h b/micro/mat4.h
new file mode 100644
index 0000000..3d99312
--- /dev/null
+++ b/micro/mat4.h
@@ -0,0 +1,18 @@
+#ifndef __MICRO_MAT4_H__
+#define __MICRO_MAT4_H__
+
+#include "common.h"
+
+typedef float mat4[4][4];
+
+void mat4_identity(mat4 m);
+void mat4_translate(mat4 m, float x, float y);
+void mat4_mult(mat4 dst, mat4 a, mat4 b);
+void mat4_ortho(
+ mat4 m,
+ float l, float r,
+ float t, float b,
+ float n, float f
+);
+
+#endif // __MICRO_MAT4_H__