diff options
| author | Aetias <aetias@outlook.com> | 2024-01-07 12:29:09 +0100 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2024-01-07 12:29:09 +0100 |
| commit | 7e0073fd413ed040ecb0af7b50dde22dd01f7eb0 (patch) | |
| tree | 753f99031013d8b980408096a2aff4e759f8a894 /include | |
| parent | 1e33a22c9ec7c73a7f0fb0d7893816c4da1e3c45 (diff) | |
Add fixed point vector type
Diffstat (limited to 'include')
| -rw-r--r-- | include/lib/math.h | 10 |
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 |
