diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/maths.cpp | 8 | ||||
-rw-r--r-- | lib/maths.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/maths.cpp b/lib/maths.cpp index 51e27fe..ea245f0 100644 --- a/lib/maths.cpp +++ b/lib/maths.cpp @@ -77,7 +77,13 @@ rotate_ypr(Rotation3D a) glm::mat4 rotate_yp(Rotation2D a) { - return rotate_yaw(a.y) * rotate_pitch(a.x); + return rotate_yp(a.y, a.x); +} + +glm::mat4 +rotate_yp(Angle yaw, Angle pitch) +{ + return rotate_yaw(yaw) * rotate_pitch(pitch); } float diff --git a/lib/maths.h b/lib/maths.h index 3127d3c..32f2884 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -97,6 +97,7 @@ glm::mat4 rotate_roll(float); glm::mat4 rotate_yaw(float); glm::mat4 rotate_pitch(float); glm::mat4 rotate_yp(Rotation2D); +glm::mat4 rotate_yp(Angle yaw, Angle pitch); glm::mat4 rotate_ypr(Rotation3D); float vector_yaw(const Direction2D & diff); |