From bd1cbbdda889071de6eacbc9c87ef8028bccafa7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 31 Dec 2021 13:42:52 +0000 Subject: Add glm::vec concatenation operator|| --- lib/maths.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib') diff --git a/lib/maths.h b/lib/maths.h index a75c7a8..c7b1c8f 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -97,6 +97,20 @@ operator!(const glm::vec2 & v) return v ^ 0.F; } +template +inline constexpr glm::vec +operator||(const glm::vec v1, const glm::vec v2) +{ + return {v1, v2}; +} + +template +inline constexpr glm::vec +operator||(const glm::vec v1, const T v2) +{ + return {v1, v2}; +} + constexpr inline float arc_length(const Arc & arc) { -- cgit v1.2.3