aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-24 21:06:31 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-24 21:06:31 +0100
commit2e1ab2595b408ed321e69c61c7cd39c05c8e2d69 (patch)
treee23abac8f53650612d4ba002c7ea62238294bc2b
parent3a924a2c5487b8d1785633ddba4f320a82a04cc3 (diff)
Fix glyphs overlapping, but adds unnecessary padding
m---------depends/mgl0
-rw-r--r--include/mglpp/system/vec.hpp6
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;