summaryrefslogtreecommitdiff
path: root/lib/maths.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-12-29 14:12:40 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-12-29 14:12:40 +0000
commit048f18e2a0b32044525cef41fa053984433c74b9 (patch)
treedfa4a11169654924c55a4dbfb0de3863e1f33342 /lib/maths.cpp
parentRemove weird operator! on vec2/3 (diff)
downloadilt-048f18e2a0b32044525cef41fa053984433c74b9.tar.bz2
ilt-048f18e2a0b32044525cef41fa053984433c74b9.tar.xz
ilt-048f18e2a0b32044525cef41fa053984433c74b9.zip
Remove misleading power operator^ on vec2/3
Diffstat (limited to 'lib/maths.cpp')
-rw-r--r--lib/maths.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/maths.cpp b/lib/maths.cpp
index 0c25820..17082d4 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.xy() ^ 0.F)};
+ 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;