aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
parent3a924a2c5487b8d1785633ddba4f320a82a04cc3 (diff)
Fix glyphs overlapping, but adds unnecessary padding
Diffstat (limited to 'include')
-rw-r--r--include/mglpp/system/vec.hpp6
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;