summaryrefslogtreecommitdiff
path: root/maths.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'maths.hpp')
-rw-r--r--maths.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/maths.hpp b/maths.hpp
index 98a318f..e9b2fa8 100644
--- a/maths.hpp
+++ b/maths.hpp
@@ -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];