summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2024-01-07 12:29:09 +0100
committerAetias <aetias@outlook.com>2024-01-07 12:29:09 +0100
commit7e0073fd413ed040ecb0af7b50dde22dd01f7eb0 (patch)
tree753f99031013d8b980408096a2aff4e759f8a894
parent1e33a22c9ec7c73a7f0fb0d7893816c4da1e3c45 (diff)
Add fixed point vector type
-rw-r--r--include/lib/math.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/lib/math.h b/include/lib/math.h
index 153ac2c6..1b27fe54 100644
--- a/include/lib/math.h
+++ b/include/lib/math.h
@@ -5,4 +5,14 @@
extern "C" u32 FastDivide(u32 a, u32 b);
+// 20.12 fixed point number
+typedef u32 p32;
+
+typedef struct {
+ /* 0 */ p32 x;
+ /* 4 */ p32 y;
+ /* 8 */ p32 z;
+ /* c */
+} Vec3p;
+
#endif