diff options
author | quou <quou@disroot.org> | 2025-01-21 00:17:00 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-01-21 00:17:00 +1100 |
commit | 3d6c0450f8a5d46dfced510bad7d0a3792c3359b (patch) | |
tree | a322850f0ae2ce156d2dd21e17ab56783d2cc0ad /maths.hpp | |
parent | a98215feea95f3a87ead802e7815f62c83ebf77d (diff) |
quaternion
Diffstat (limited to 'maths.hpp')
-rw-r--r-- | maths.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -469,6 +469,18 @@ struct AABB { v3f min, max; }; +namespace quat { + v4f identity(); + v4f scale(const v4f& q, float s); + v4f normalised(const v4f& q); + v4f conjugate(const v4f& q); + template <bool normalise> + v4f mul(const v4f& a, const v4f& b); + v4f mul(const v4f& a, const v4f& b); + v4f rotate(float angle, const v3f& axis); + v4f euler(const v3f& a); +} + struct m4f { float m[4][4]; |