diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-27 20:06:22 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-27 20:06:22 +0000 |
commit | 3e9c8a9c97f1c87015ff756272dd750f3bdce14d (patch) | |
tree | cac37d0312ab756871a033a150a259ada21cec83 /utility | |
parent | Handy log macro (diff) | |
download | ilt-3e9c8a9c97f1c87015ff756272dd750f3bdce14d.tar.bz2 ilt-3e9c8a9c97f1c87015ff756272dd750f3bdce14d.tar.xz ilt-3e9c8a9c97f1c87015ff756272dd750f3bdce14d.zip |
Operator! to convert vec3 to vec2
Diffstat (limited to 'utility')
-rw-r--r-- | utility/maths.h | 6 |
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) { |