summaryrefslogtreecommitdiff
path: root/lib/maths.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-05 12:15:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-05 12:15:33 +0100
commit38a839533e76d3e9570591a6aeec7c5c500270cf (patch)
tree339380935fca85836c4fe218e4f71f7c9c7bb25f /lib/maths.cpp
parentPsycho-rebased branch billboard-shadows on top of main (diff)
downloadilt-38a839533e76d3e9570591a6aeec7c5c500270cf.tar.bz2
ilt-38a839533e76d3e9570591a6aeec7c5c500270cf.tar.xz
ilt-38a839533e76d3e9570591a6aeec7c5c500270cf.zip
Add rotate_yp taking two separate parameters
Diffstat (limited to 'lib/maths.cpp')
-rw-r--r--lib/maths.cpp8
1 files changed, 7 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