]> git.tdb.fi Git - libs/math.git/blob - source/linal/vector2.h
fed7721411879ac2020cb0e55cf9fb4bc19d2853
[libs/math.git] / source / linal / vector2.h
1 #ifndef MSP_LINAL_VECTOR2_H_
2 #define MSP_LINAL_VECTOR2_H_
3
4 #include "vector.h"
5
6 namespace Msp {
7 namespace LinAl {
8
9 template<typename T>
10 class Vector2: public Vector<T, 2>
11 {
12 public:
13         Vector2() { }
14         Vector2(const T *d): Vector<T, 2>(d) { }
15         Vector2(T, T);
16         template<typename U>
17         Vector2(const Vector<U, 2> &v): Vector<T, 2>(v) { }
18 };
19
20 template<typename T>
21 inline Vector2<T>::Vector2(T x, T y)
22 {
23         this->data[0] = x;
24         this->data[1] = y;
25 }
26
27 } // namespace LinAl
28 } // namespace Msp
29
30 #endif