diff options
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/basis.cpp | 12 | ||||
-rw-r--r-- | core/math/bsp_tree.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/math/basis.cpp b/core/math/basis.cpp index d77501c0f6..09d04a8a2a 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -739,8 +739,8 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { if ((xx > yy) && (xx > zz)) { // elements[0][0] is the largest diagonal term if (xx < epsilon) { x = 0; - y = 0.7071; - z = 0.7071; + y = Math_SQRT12; + z = Math_SQRT12; } else { x = Math::sqrt(xx); y = xy / x; @@ -748,9 +748,9 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { } } else if (yy > zz) { // elements[1][1] is the largest diagonal term if (yy < epsilon) { - x = 0.7071; + x = Math_SQRT12; y = 0; - z = 0.7071; + z = Math_SQRT12; } else { y = Math::sqrt(yy); x = xy / y; @@ -758,8 +758,8 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { } } else { // elements[2][2] is the largest diagonal term so base result on this if (zz < epsilon) { - x = 0.7071; - y = 0.7071; + x = Math_SQRT12; + y = Math_SQRT12; z = 0; } else { z = Math::sqrt(zz); diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp index ece293d036..f1d4505c35 100644 --- a/core/math/bsp_tree.cpp +++ b/core/math/bsp_tree.cpp @@ -192,14 +192,14 @@ int BSP_Tree::get_points_inside(const Vector3 *p_points, int p_point_count) cons #ifdef DEBUG_ENABLED int plane_count = planes.size(); uint16_t plane = nodesptr[idx].plane; - ERR_FAIL_UNSIGNED_INDEX_V(plane, plane_count, false); + ERR_FAIL_UNSIGNED_INDEX_V(plane, plane_count, 0); #endif idx = planesptr[nodesptr[idx].plane].is_point_over(point) ? nodes[idx].over : nodes[idx].under; #ifdef DEBUG_ENABLED - ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, false); + ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, 0); #endif } |