aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/system/vec.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mglpp/system/vec.hpp')
-rw-r--r--include/mglpp/system/vec.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/mglpp/system/vec.hpp b/include/mglpp/system/vec.hpp
new file mode 100644
index 0000000..40262f0
--- /dev/null
+++ b/include/mglpp/system/vec.hpp
@@ -0,0 +1,20 @@
+#ifndef MGLPP_VEC_HPP
+#define MGLPP_VEC_HPP
+
+namespace mgl {
+ struct vec2f {
+ float x = 0.0f;
+ float y = 0.0f;
+ };
+
+ struct vec2i {
+ int x = 0;
+ int y = 0;
+
+ vec2f to_vec2f() const {
+ return { (float)x, (float)y };
+ }
+ };
+}
+
+#endif /* MGLPP_VEC_HPP */