diff options
Diffstat (limited to 'lib/maths.cpp')
-rw-r--r-- | lib/maths.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/maths.cpp b/lib/maths.cpp index 5430ef6..0c25820 100644 --- a/lib/maths.cpp +++ b/lib/maths.cpp @@ -9,7 +9,7 @@ glm::mat4 flat_orientation(const Direction3D & diff) { static const auto oneeighty {glm::rotate(pi, up)}; - const auto flatdiff {glm::normalize(!!diff)}; + const auto flatdiff {glm::normalize(diff.xy() ^ 0.F)}; auto e {glm::orientation(flatdiff, north)}; // Handle if diff is exactly opposite to north return (std::isnan(e[0][0])) ? oneeighty : e; |