summaryrefslogtreecommitdiff
path: root/utility/maths.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 13:35:52 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 13:35:52 +0000
commit95e45557ba76132d7b7e8326bccd08a50f81eb0e (patch)
tree12e185af5ba4ce9a7ec04ce27c2e85ab286ff1ea /utility/maths.cpp
parentDon't copy shared_ptrs (diff)
downloadilt-95e45557ba76132d7b7e8326bccd08a50f81eb0e.tar.bz2
ilt-95e45557ba76132d7b7e8326bccd08a50f81eb0e.tar.xz
ilt-95e45557ba76132d7b7e8326bccd08a50f81eb0e.zip
Rename flat_angle to vector_yaw
Diffstat (limited to 'utility/maths.cpp')
-rw-r--r--utility/maths.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utility/maths.cpp b/utility/maths.cpp
index e36c91e..aa44220 100644
--- a/utility/maths.cpp
+++ b/utility/maths.cpp
@@ -16,7 +16,7 @@ flat_orientation(const glm::vec3 & diff)
}
float
-flat_angle(const glm::vec3 & diff)
+vector_yaw(const glm::vec3 & diff)
{
return std::atan2(diff.x, diff.z);
}
@@ -43,9 +43,9 @@ Arc::Arc(const glm::vec3 & centre3, const glm::vec3 & e0p, const glm::vec3 & e1p
Arc([&]() -> Arc {
const auto diffa = e0p - centre3;
const auto diffb = e1p - centre3;
- const auto anga = flat_angle(diffa);
+ const auto anga = vector_yaw(diffa);
const auto angb = [&diffb, &anga]() {
- const auto angb = flat_angle(diffb);
+ const auto angb = vector_yaw(diffb);
return (angb < anga) ? angb + two_pi : angb;
}();
return {anga, angb};