summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 12:59:51 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 12:59:51 +0000
commit5638f6da767a7c3b5c8511d5908fcc60727fafcf (patch)
treecfa17c709b40c973be8bbf2ad5ecd41e22e5027b /utility
parentAdd operator[] to Arc (diff)
downloadilt-5638f6da767a7c3b5c8511d5908fcc60727fafcf.tar.bz2
ilt-5638f6da767a7c3b5c8511d5908fcc60727fafcf.tar.xz
ilt-5638f6da767a7c3b5c8511d5908fcc60727fafcf.zip
Simplify flat_angle
Diffstat (limited to 'utility')
-rw-r--r--utility/maths.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/utility/maths.cpp b/utility/maths.cpp
index a3315a3..5cae411 100644
--- a/utility/maths.cpp
+++ b/utility/maths.cpp
@@ -18,8 +18,7 @@ flat_orientation(const glm::vec3 & diff)
float
flat_angle(const glm::vec3 & diff)
{
- const auto flatdiff {glm::normalize(glm::vec3 {diff.x, 0, diff.z})};
- return glm::orientedAngle(flatdiff, north, up);
+ return std::atan2(diff.x, diff.z);
}
float