summaryrefslogtreecommitdiffstats
path: root/core/math/quaternion.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/quaternion.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/quaternion.h')
-rw-r--r--core/math/quaternion.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/math/quaternion.h b/core/math/quaternion.h
index ea952304a5..f8133df559 100644
--- a/core/math/quaternion.h
+++ b/core/math/quaternion.h
@@ -33,8 +33,7 @@
#include "core/math/math_funcs.h"
#include "core/math/vector3.h"
-
-class String;
+#include "core/string/ustring.h"
struct _NO_DISCARD_ Quaternion {
union {
@@ -90,7 +89,7 @@ struct _NO_DISCARD_ Quaternion {
_FORCE_INLINE_ Vector3 xform(const Vector3 &v) const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V_MSG(!is_normalized(), v, "The quaternion must be normalized.");
+ ERR_FAIL_COND_V_MSG(!is_normalized(), v, "The quaternion " + operator String() + " must be normalized.");
#endif
Vector3 u(x, y, z);
Vector3 uv = u.cross(v);