X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Flinal%2Fvector2.h;fp=source%2Flinal%2Fvector2.h;h=fed7721411879ac2020cb0e55cf9fb4bc19d2853;hb=ec9e0699ef686a3314d4c9ee0f39b29a92d3aeed;hp=0000000000000000000000000000000000000000;hpb=e0d926c9c177ec28f1aaf326a6921438de9db9a3;p=libs%2Fmath.git diff --git a/source/linal/vector2.h b/source/linal/vector2.h new file mode 100644 index 0000000..fed7721 --- /dev/null +++ b/source/linal/vector2.h @@ -0,0 +1,30 @@ +#ifndef MSP_LINAL_VECTOR2_H_ +#define MSP_LINAL_VECTOR2_H_ + +#include "vector.h" + +namespace Msp { +namespace LinAl { + +template +class Vector2: public Vector +{ +public: + Vector2() { } + Vector2(const T *d): Vector(d) { } + Vector2(T, T); + template + Vector2(const Vector &v): Vector(v) { } +}; + +template +inline Vector2::Vector2(T x, T y) +{ + this->data[0] = x; + this->data[1] = y; +} + +} // namespace LinAl +} // namespace Msp + +#endif