diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-14 12:59:51 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-14 12:59:51 +0000 |
commit | 5638f6da767a7c3b5c8511d5908fcc60727fafcf (patch) | |
tree | cfa17c709b40c973be8bbf2ad5ecd41e22e5027b | |
parent | Add operator[] to Arc (diff) | |
download | ilt-5638f6da767a7c3b5c8511d5908fcc60727fafcf.tar.bz2 ilt-5638f6da767a7c3b5c8511d5908fcc60727fafcf.tar.xz ilt-5638f6da767a7c3b5c8511d5908fcc60727fafcf.zip |
Simplify flat_angle
-rw-r--r-- | utility/maths.cpp | 3 |
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 |