diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mglpp/system/vec.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mglpp/system/vec.hpp b/include/mglpp/system/vec.hpp index c81cdfa..44141f8 100644 --- a/include/mglpp/system/vec.hpp +++ b/include/mglpp/system/vec.hpp @@ -58,7 +58,11 @@ namespace mgl { } vec2<float> to_vec2f() const { - return { (float)x, (float)y }; + return { static_cast<float>(x), static_cast<float>(y) }; + } + + vec2<T> floor() const { + return { static_cast<int>(x), static_cast<int>(y) }; } T x; |