diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-29 21:49:54 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-10-29 21:52:12 +0100 |
commit | b1296f2c97c6fdc1c6a9922dc09c951b5cafdc12 (patch) | |
tree | 0986a2e3ab45f73c1f7219deef044b3d4ca94e89 /include/dchat/Vec2.hpp |
Initial commit
Diffstat (limited to 'include/dchat/Vec2.hpp')
-rw-r--r-- | include/dchat/Vec2.hpp | 32 |
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 |