From 631e8a0f47e5e5691585b51784550e80e82dc63b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 5 Feb 2025 18:28:18 +0100 Subject: Add vec2::to_vec2i --- include/mglpp/system/vec.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/mglpp/system/vec.hpp b/include/mglpp/system/vec.hpp index 23ef935..d424f42 100644 --- a/include/mglpp/system/vec.hpp +++ b/include/mglpp/system/vec.hpp @@ -61,6 +61,10 @@ namespace mgl { return { static_cast(x), static_cast(y) }; } + vec2 to_vec2i() const { + return { static_cast(x), static_cast(y) }; + } + vec2 floor() const { return { static_cast(static_cast(x)), static_cast(static_cast(y)) }; } -- cgit v1.2.3