diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-06-24 21:37:15 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-06-24 21:37:15 +0200 |
commit | 7c2e955e1552a9c4e412ea2c936be61fc78ba010 (patch) | |
tree | ee506dfbec54f998d10c385bde3a1c3fa04e66b2 /src/math/vector.h | |
parent | e218dcfdf2c58f8841e7ebd220527d08e870a6d5 (diff) | |
parent | b376486fd74fa02b0297ceef6d0f977b32358e5e (diff) | |
download | colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.tar.gz colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.tar.bz2 colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.zip |
Colobot Gold 0.1.0-alpha
Diffstat (limited to 'src/math/vector.h')
-rw-r--r-- | src/math/vector.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/math/vector.h b/src/math/vector.h index 73e8e44..6827785 100644 --- a/src/math/vector.h +++ b/src/math/vector.h @@ -57,17 +57,17 @@ struct Vector //! Creates a zero vector (0, 0, 0) inline Vector() - { - LoadZero(); - } + : x(0.0f) + , y(0.0f) + , z(0.0f) + {} //! Creates a vector from given values - inline explicit Vector(float x, float y, float z) - { - this->x = x; - this->y = y; - this->z = z; - } + inline explicit Vector(float _x, float _y, float _z) + : x(_x) + , y(_y) + , z(_z) + {} //! Loads the zero vector (0, 0, 0) inline void LoadZero() @@ -281,3 +281,4 @@ inline Vector Clamp(const Vector &vec, const Vector &min, const Vector &max) } // namespace Math + |