diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mglpp/system/vec.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<float>(x), static_cast<float>(y) }; } + vec2<int> to_vec2i() const { + return { static_cast<int>(x), static_cast<int>(y) }; + } + vec2<T> floor() const { return { static_cast<T>(static_cast<int>(x)), static_cast<T>(static_cast<int>(y)) }; } |