From 5638f6da767a7c3b5c8511d5908fcc60727fafcf Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 14 Feb 2021 12:59:51 +0000 Subject: Simplify flat_angle --- utility/maths.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'utility') 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 -- cgit v1.2.3