summary refs log tree commit diff
path: root/src/Math/Rotation.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Math/Rotation.hpp')
-rw-r--r--src/Math/Rotation.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Math/Rotation.hpp b/src/Math/Rotation.hpp
index 73a8219..0c5c606 100644
--- a/src/Math/Rotation.hpp
+++ b/src/Math/Rotation.hpp
@@ -11,8 +11,8 @@ public:
 
     Rotation(float angles[3]) : Rotation(angles[0], angles[1], angles[2]) {};
 
-    Rotation(float x, float y, float z) {
-        vector = wrap({ x, y, z });
+    Rotation(float pitch, float yaw, float roll) {
+        vector = wrap({pitch, yaw, roll });
     };
 
     Rotation operator+(Rotation other) const {
@@ -27,5 +27,17 @@ public:
         return v.map([](auto a) { return fmod(a, 360.0f); });
     }
 
+    float& pitch() {
+        return vector[0];
+    }
+
+    float& yaw() {
+        return vector[1];
+    }
+
+    float& roll() {
+        return vector[2];
+    }
+
     Vector<3> vector;
 };
\ No newline at end of file