aboutsummaryrefslogtreecommitdiff
path: root/include/dchat/Vec2.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/dchat/Vec2.hpp')
-rw-r--r--include/dchat/Vec2.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/dchat/Vec2.hpp b/include/dchat/Vec2.hpp
new file mode 100644
index 0000000..cb5f8c0
--- /dev/null
+++ b/include/dchat/Vec2.hpp
@@ -0,0 +1,32 @@
+#pragma once
+
+namespace dchat
+{
+ template <typename T>
+ struct Vec2
+ {
+ T x, y;
+
+ Vec2() : x(), y() {}
+ Vec2(T _x, T _y) : x(_x), y(_y) {}
+/*
+ Vec2(const Vec2<T> &other)
+ {
+ x = other.x;
+ y = other.y;
+ }
+
+ Vec2<T>& operator = (const Vec2<T> &other)
+ {
+ x = other.x;
+ y = other.y;
+ return *this;
+ }
+*/
+ };
+
+ using Vec2f = Vec2<float>;
+ using Vec2d = Vec2<double>;
+ using Vec2i = Vec2<int>;
+ using Vec2u = Vec2<unsigned int>;
+} \ No newline at end of file