summaryrefslogtreecommitdiff
path: root/utility/maths.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-27 20:06:22 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-27 20:06:22 +0000
commit3e9c8a9c97f1c87015ff756272dd750f3bdce14d (patch)
treecac37d0312ab756871a033a150a259ada21cec83 /utility/maths.h
parentHandy log macro (diff)
downloadilt-3e9c8a9c97f1c87015ff756272dd750f3bdce14d.tar.bz2
ilt-3e9c8a9c97f1c87015ff756272dd750f3bdce14d.tar.xz
ilt-3e9c8a9c97f1c87015ff756272dd750f3bdce14d.zip
Operator! to convert vec3 to vec2
Diffstat (limited to 'utility/maths.h')
-rw-r--r--utility/maths.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/utility/maths.h b/utility/maths.h
index 996708f..47b95a3 100644
--- a/utility/maths.h
+++ b/utility/maths.h
@@ -33,6 +33,12 @@ float vector_pitch(const glm::vec3 & diff);
float round_frac(const float & v, const float & frac);
+constexpr inline glm::vec2
+operator!(const glm::vec3 & v)
+{
+ return {v.x, v.z};
+}
+
constexpr inline glm::vec3
operator!(const glm::vec2 & v)
{