diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-12 10:01:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-12 10:01:48 +0100 |
commit | daf9729b925ea13d77312bb3ce18198e158c03a8 (patch) | |
tree | 44dba39a46237db559a8ab82189328f171492edd /core/math/vector2.h | |
parent | 7a7fabe4f6d66ffb0c0fbbaf1696e67456c383d7 (diff) | |
parent | 5298e16e80e032a7ff0c6a661b826859e5aeccd0 (diff) |
Merge pull request #57703 from lawnjelly/float_literals_math_funcs
Diffstat (limited to 'core/math/vector2.h')
-rw-r--r-- | core/math/vector2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/vector2.h b/core/math/vector2.h index 92ac5257b0..a2680b84fc 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -248,7 +248,7 @@ Vector2 Vector2::lerp(const Vector2 &p_to, const real_t p_weight) const { Vector2 Vector2::slerp(const Vector2 &p_to, const real_t p_weight) const { real_t start_length_sq = length_squared(); real_t end_length_sq = p_to.length_squared(); - if (unlikely(start_length_sq == 0.0 || end_length_sq == 0.0)) { + if (unlikely(start_length_sq == 0.0f || end_length_sq == 0.0f)) { // Zero length vectors have no angle, so the best we can do is either lerp or throw an error. return lerp(p_to, p_weight); } |