diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-01-24 16:55:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-24 16:55:34 +0100 |
| commit | feb88ebe6fd8468eb17d597b31d3b5b73196e180 (patch) | |
| tree | 3fc1e8c3c4ad5e2b353737ae860674acdb13adc0 /core/math/vector2.h | |
| parent | 97cc2e53f6fbba7e85a2cbb79f38e077a6e511f7 (diff) | |
| parent | a002b93d860887a219aa40d7a5cc65fc3a5272c1 (diff) | |
Merge pull request #35510 from Calinou/add-normalized-error-explanations
Add explanations for errors related to Vector/Quat normalization
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 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); |