aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Math/Vector2.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-09-06 19:57:40 +0800
committerchai <chaifix@163.com>2018-09-06 19:57:40 +0800
commit50084b0b3451328a4dfe6db65c78a225e9c8f288 (patch)
tree020e5b6c834b792aada4cd23cd2551a6b81c22dc /src/libjin/Math/Vector2.h
parent7281a70b1e38fc2bdfb2d4b6d8f7daf7ceedbd1a (diff)
+bitmap
Diffstat (limited to 'src/libjin/Math/Vector2.h')
-rw-r--r--src/libjin/Math/Vector2.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libjin/Math/Vector2.h b/src/libjin/Math/Vector2.h
new file mode 100644
index 0000000..ce96ac8
--- /dev/null
+++ b/src/libjin/Math/Vector2.h
@@ -0,0 +1,29 @@
+#ifndef __JIN_VECTOR_H
+#define __JIN_VECTOR_H
+
+namespace jin
+{
+namespace math
+{
+
+ template<typename T>
+ class Vector2
+ {
+ public:
+ Vector2() : x(0), y(0) {};
+ Vector2(T _x, T _y) :x(_x), y(_y) {};
+ Vector2(const Vector2<T>& v)
+ {
+ x = v.x;
+ y = v.y;
+ }
+
+ T x;
+ T y;
+
+ };
+
+} // math
+} // jin
+
+#endif \ No newline at end of file