summaryrefslogtreecommitdiffstats
path: root/src/math/point.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/point.h')
-rw-r--r--src/math/point.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/math/point.h b/src/math/point.h
index 456fe1e..edb902b 100644
--- a/src/math/point.h
+++ b/src/math/point.h
@@ -52,16 +52,15 @@ struct Point
//! Constructs a zero point: (0,0)
inline Point()
- {
- LoadZero();
- }
+ : x(0.0f)
+ , y(0.0f)
+ {}
//! Constructs a point from given coords: (x,y)
- inline explicit Point(float x, float y)
- {
- this->x = x;
- this->y = y;
- }
+ inline explicit Point(float _x, float _y)
+ : x(_x)
+ , y(_y)
+ {}
//! Sets the zero point: (0,0)
inline void LoadZero()
@@ -191,3 +190,4 @@ inline float Distance(const Point &a, const Point &b)
} // namespace Math
+