summaryrefslogtreecommitdiffstats
path: root/core/math/vector3.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-29 13:16:51 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-29 13:16:51 +0100
commit269145f48a13a943f52d67a20d9aa7b075f1e0db (patch)
tree414179012a354bb78c18204c2408eb25081549af /core/math/vector3.h
parent440d8cd989c484e5b3bee7f733574a92376d98c9 (diff)
parent0437db0106374ca42b0081e46954e72208b5b30b (diff)
downloadredot-engine-269145f48a13a943f52d67a20d9aa7b075f1e0db.tar.gz
Merge pull request #87300 from Calinou/math-normalize-error-show-value
Display values in vector/quaternion math function errors
Diffstat (limited to 'core/math/vector3.h')
-rw-r--r--core/math/vector3.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 18943a820f..7551b21493 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -33,8 +33,8 @@
#include "core/error/error_macros.h"
#include "core/math/math_funcs.h"
+#include "core/string/ustring.h"
-class String;
struct Basis;
struct Vector2;
struct Vector3i;
@@ -512,7 +512,7 @@ void Vector3::zero() {
// slide returns the component of the vector along the given plane, specified by its normal vector.
Vector3 Vector3::slide(const Vector3 &p_normal) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 must be normalized.");
+ ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 " + p_normal.operator String() + " must be normalized.");
#endif
return *this - p_normal * this->dot(p_normal);
}
@@ -523,7 +523,7 @@ Vector3 Vector3::bounce(const Vector3 &p_normal) const {
Vector3 Vector3::reflect(const Vector3 &p_normal) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 must be normalized.");
+ ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 " + p_normal.operator String() + " must be normalized.");
#endif
return 2.0f * p_normal * this->dot(p_normal) - *this;
}