[DEV] better init of the Vector2/3D element

This commit is contained in:
Edouard DUPIN 2012-11-23 23:44:44 +01:00
parent 6ceb992e45
commit 03c1459c66
2 changed files with 2 additions and 8 deletions

View File

@ -24,10 +24,7 @@ namespace etk
/*****************************************************
* Constructor
*****************************************************/
Vector2D(void) : x(0), y(0) { };
Vector2D(double _x, double _y) : x(_x), y(_y) { };
Vector2D(float _x, float _y) : x(_x), y(_y) { };
Vector2D(int32_t _x, int32_t _y) : x(_x), y(_y) { };
Vector2D(T _x=0, T _y=0) : x(_x), y(_y) { };
Vector2D(const Vector2D<double>& obj) : x((T)obj.x), y((T)obj.y) { };
Vector2D(const Vector2D<float>& obj) : x((T)obj.x), y((T)obj.y) { };
Vector2D(const Vector2D<int32_t>& obj) : x((T)obj.x), y((T)obj.y) { };

View File

@ -25,10 +25,7 @@ namespace etk
/*****************************************************
* Constructor
*****************************************************/
Vector3D(void) : x(0), y(0), z(0) { };
Vector3D(double _x, double _y, double _z) : x(_x), y(_y), z(_z) { };
Vector3D(float _x, float _y, float _z) : x(_x), y(_y), z(_z) { };
Vector3D(int32_t _x, int32_t _y, int32_t _z) : x(_x), y(_y), z(_z) { };
Vector3D(T _x=0, T _y=0, T _z=0) : x(_x), y(_y), z(_z) { };
Vector3D(const Vector3D<double>& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z) { };
Vector3D(const Vector3D<float>& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z) { };
Vector3D(const Vector3D<int32_t>& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z) { };