From b1296f2c97c6fdc1c6a9922dc09c951b5cafdc12 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 29 Oct 2018 21:49:54 +0100 Subject: Initial commit --- include/dchat/Vec2.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/dchat/Vec2.hpp (limited to 'include/dchat/Vec2.hpp') 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 + struct Vec2 + { + T x, y; + + Vec2() : x(), y() {} + Vec2(T _x, T _y) : x(_x), y(_y) {} +/* + Vec2(const Vec2 &other) + { + x = other.x; + y = other.y; + } + + Vec2& operator = (const Vec2 &other) + { + x = other.x; + y = other.y; + return *this; + } +*/ + }; + + using Vec2f = Vec2; + using Vec2d = Vec2; + using Vec2i = Vec2; + using Vec2u = Vec2; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2