From a002b93d860887a219aa40d7a5cc65fc3a5272c1 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 24 Jan 2020 13:51:25 +0100 Subject: Add explanations for errors related to Vector/Quat normalization --- core/math/vector2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/math/vector2.h') 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); -- cgit v1.2.3