summaryrefslogtreecommitdiff
path: root/core/math/vector2.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-12 10:01:48 +0100
committerGitHub <noreply@github.com>2022-02-12 10:01:48 +0100
commitdaf9729b925ea13d77312bb3ce18198e158c03a8 (patch)
tree44dba39a46237db559a8ab82189328f171492edd /core/math/vector2.h
parent7a7fabe4f6d66ffb0c0fbbaf1696e67456c383d7 (diff)
parent5298e16e80e032a7ff0c6a661b826859e5aeccd0 (diff)
Merge pull request #57703 from lawnjelly/float_literals_math_funcs
Diffstat (limited to 'core/math/vector2.h')
-rw-r--r--core/math/vector2.h2
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);
}