diff options
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 + |