summaryrefslogtreecommitdiff
path: root/core/math/vector2.h
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-01-24 13:51:25 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-01-24 14:19:23 +0100
commita002b93d860887a219aa40d7a5cc65fc3a5272c1 (patch)
tree3fc1e8c3c4ad5e2b353737ae860674acdb13adc0 /core/math/vector2.h
parent97cc2e53f6fbba7e85a2cbb79f38e077a6e511f7 (diff)
Add explanations for errors related to Vector/Quat normalization
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 351c974cf3..1dec830821 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -242,7 +242,7 @@ Vector2 Vector2::linear_interpolate(const Vector2 &p_b, real_t p_t) const {
Vector2 Vector2::slerp(const Vector2 &p_b, real_t p_t) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V(!is_normalized(), Vector2());
+ ERR_FAIL_COND_V_MSG(!is_normalized(), Vector2(), "The start Vector2 must be normalized.");
#endif
real_t theta = angle_to(p_b);
return rotated(theta * p_t);