blob: cb5f8c06e427f488e7c42ce33902e00398578645 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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>;
}
|