diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-07 10:58:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-07 10:58:45 +0200 |
commit | 44d82b3a070b7ed8973d9e8bc6e58da1084fc7d1 (patch) | |
tree | 544ab66de3ef4c6a20f2739decc4e98212c3207a /core/math/vector2.cpp | |
parent | c27b2adb10ea7077008d4f8b356e3561d05bad6a (diff) | |
parent | 4f7b33cdcfdcbc11bcc506018dff1b06db3cf3f6 (diff) | |
download | redot-engine-44d82b3a070b7ed8973d9e8bc6e58da1084fc7d1.tar.gz |
Merge pull request #22752 from aaronfranke/equals-redundant
Remove redundant "== true" and "== false" code
Diffstat (limited to 'core/math/vector2.cpp')
-rw-r--r-- | core/math/vector2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp index 84c9f0fca6..7c6f056f09 100644 --- a/core/math/vector2.cpp +++ b/core/math/vector2.cpp @@ -167,7 +167,7 @@ Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, c // slide returns the component of the vector along the given plane, specified by its normal vector. Vector2 Vector2::slide(const Vector2 &p_normal) const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V(p_normal.is_normalized() == false, Vector2()); + ERR_FAIL_COND_V(!p_normal.is_normalized(), Vector2()); #endif return *this - p_normal * this->dot(p_normal); } @@ -178,7 +178,7 @@ Vector2 Vector2::bounce(const Vector2 &p_normal) const { Vector2 Vector2::reflect(const Vector2 &p_normal) const { #ifdef MATH_CHECKS - ERR_FAIL_COND_V(p_normal.is_normalized() == false, Vector2()); + ERR_FAIL_COND_V(!p_normal.is_normalized(), Vector2()); #endif return 2.0 * p_normal * this->dot(p_normal) - *this; } |