From fe2baedc760c2f29e2c720f6b1132a2de33c5430 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 8 Jul 2023 03:25:44 +0200 Subject: Use own size types --- src/Math/Rotation.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Math/Rotation.hpp') diff --git a/src/Math/Rotation.hpp b/src/Math/Rotation.hpp index a3420ed..83c1109 100644 --- a/src/Math/Rotation.hpp +++ b/src/Math/Rotation.hpp @@ -8,9 +8,9 @@ struct Rotation { Rotation(Vector<3> vector) : vector{ wrap(vector) } {} - explicit Rotation(float angles[3]) : Rotation(angles[0], angles[1], angles[2]) {} + explicit Rotation(Real angles[3]) : Rotation(angles[0], angles[1], angles[2]) {} - Rotation(float pitch, float yaw, float roll) { + Rotation(Real pitch, Real yaw, Real roll) { vector = wrap({pitch, yaw, roll }); } @@ -26,15 +26,15 @@ struct Rotation { return v.map([](auto a) { return fmod(a, 360.0f); }); } - float& pitch() { + Real& pitch() { return vector[0]; } - float& yaw() { + Real& yaw() { return vector[1]; } - float& roll() { + Real& roll() { return vector[2]; } -- cgit 1.4.1