diff options
m--------- | depends/mgl | 0 | ||||
-rw-r--r-- | include/mglpp/system/vec.hpp | 6 |
2 files changed, 5 insertions, 1 deletions
diff --git a/depends/mgl b/depends/mgl -Subproject 242e4d0ea14a713e38b99e4206bb0f05c05f92d +Subproject 6b7fbf4fe476d908fd44ca9421363e053324ba6 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; |