aboutsummaryrefslogtreecommitdiffstats
path: root/include/vec2.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/vec2.hpp')
-rw-r--r--include/vec2.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/vec2.hpp b/include/vec2.hpp
new file mode 100644
index 0000000..dcd4b93
--- /dev/null
+++ b/include/vec2.hpp
@@ -0,0 +1,15 @@
+#ifndef VEC2_HPP
+#define VEC2_HPP
+
+struct Vec2 {
+ float x, y;
+
+ auto& operator+=(const Vec2& o) noexcept {
+ x += o.x;
+ y += o.y;
+ return *this;
+ }
+};
+
+#endif // VEC2_HPP
+