diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-11 10:31:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 10:31:04 +0200 |
commit | 306c0471f7e1450340823dbd4a72b183d486c512 (patch) | |
tree | abe207af243ba9b2090f5e059bbc08f81876d7e3 /core/math/plane.h | |
parent | 8e6768c963b0ed825e4a4dbf3aeee5907168d697 (diff) | |
parent | 6d112a68b685cde609d0d90b2c57f2db6a7b9df6 (diff) |
Merge pull request #9987 from Rubonnek/move-members-to-initilization-list
Moved member variables from constructor to initialization list
Diffstat (limited to 'core/math/plane.h')
-rw-r--r-- | core/math/plane.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/math/plane.h b/core/math/plane.h index 5a048674e4..92ebcd8024 100644 --- a/core/math/plane.h +++ b/core/math/plane.h @@ -75,7 +75,8 @@ public: _FORCE_INLINE_ Plane() { d = 0; } _FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d) - : normal(p_a, p_b, p_c), d(p_d){}; + : normal(p_a, p_b, p_c), + d(p_d){}; _FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d); _FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3 &p_normal); @@ -99,16 +100,14 @@ bool Plane::has_point(const Vector3 &p_point, real_t _epsilon) const { return (dist <= _epsilon); } -Plane::Plane(const Vector3 &p_normal, real_t p_d) { - - normal = p_normal; - d = p_d; +Plane::Plane(const Vector3 &p_normal, real_t p_d) + : normal(p_normal), + d(p_d) { } -Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal) { - - normal = p_normal; - d = p_normal.dot(p_point); +Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal) + : normal(p_normal), + d(p_normal.dot(p_point)) { } Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir) { |