From 95e45557ba76132d7b7e8326bccd08a50f81eb0e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 14 Feb 2021 13:35:52 +0000 Subject: Rename flat_angle to vector_yaw --- utility/maths.cpp | 6 +++--- utility/maths.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'utility') 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}; diff --git a/utility/maths.h b/utility/maths.h index 572268a..b8dd342 100644 --- a/utility/maths.h +++ b/utility/maths.h @@ -28,7 +28,7 @@ constexpr auto two_pi {glm::two_pi()}; glm::mat4 flat_orientation(const glm::vec3 & diff); -float flat_angle(const glm::vec3 & diff); +float vector_yaw(const glm::vec3 & diff); float round_frac(const float & v, const float & frac); -- cgit v1.2.3