diff options
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/basis.cpp | 2 | ||||
-rw-r--r-- | core/math/disjoint_set.cpp | 2 | ||||
-rw-r--r-- | core/math/geometry.cpp | 5 |
3 files changed, 3 insertions, 6 deletions
diff --git a/core/math/basis.cpp b/core/math/basis.cpp index 2985959113..0a491010e2 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -807,7 +807,7 @@ void Basis::set_quat(const Quat &p_quat) { void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_phi) { // Rotation matrix from axis and angle, see https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_angle #ifdef MATH_CHECKS - ERR_FAIL_COND(!p_axis.is_normalized()); + ERR_FAIL_COND_MSG(!p_axis.is_normalized(), "Axis must be normalized."); #endif Vector3 axis_sq(p_axis.x * p_axis.x, p_axis.y * p_axis.y, p_axis.z * p_axis.z); real_t cosine = Math::cos(p_phi); diff --git a/core/math/disjoint_set.cpp b/core/math/disjoint_set.cpp index 838939e1ba..c9d47aa0ae 100644 --- a/core/math/disjoint_set.cpp +++ b/core/math/disjoint_set.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* disjoint_set.h */ +/* disjoint_set.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index 77383e2839..e0ead8446f 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -241,10 +241,7 @@ PoolVector<PoolVector<Face3> > Geometry::separate_objects(PoolVector<Face3> p_ar bool error = _connect_faces(_fcptr, len, -1); - if (error) { - - ERR_FAIL_COND_V(error, PoolVector<PoolVector<Face3> >()); // Invalid geometry. - } + ERR_FAIL_COND_V_MSG(error, PoolVector<PoolVector<Face3> >(), "Invalid geometry."); // Group connected faces in separate objects. |