diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-07-08 23:51:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-08 23:51:53 +0200 |
commit | d23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00 (patch) | |
tree | 7b83394ae29c9e2d195892aece1a26f451376e21 /core/math | |
parent | e577c5b0705168177943fcdf9a0b66c1f8f864f3 (diff) | |
parent | 2fd204c35e6883d36d4c15adbe6725ffffd73c6f (diff) |
Merge pull request #9564 from Noshyaar/pr-threshold
Refactor 'treshold' to 'threshold'
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/face3.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/face3.cpp b/core/math/face3.cpp index 5b66e1999a..0e292500bf 100644 --- a/core/math/face3.cpp +++ b/core/math/face3.cpp @@ -272,8 +272,8 @@ void Face3::project_range(const Vector3 &p_normal, const Transform &p_transform, void Face3::get_support(const Vector3 &p_normal, const Transform &p_transform, Vector3 *p_vertices, int *p_count, int p_max) const { -#define _FACE_IS_VALID_SUPPORT_TRESHOLD 0.98 -#define _EDGE_IS_VALID_SUPPORT_TRESHOLD 0.05 +#define _FACE_IS_VALID_SUPPORT_THRESHOLD 0.98 +#define _EDGE_IS_VALID_SUPPORT_THRESHOLD 0.05 if (p_max <= 0) return; @@ -281,7 +281,7 @@ void Face3::get_support(const Vector3 &p_normal, const Transform &p_transform, V Vector3 n = p_transform.basis.xform_inv(p_normal); /** TEST FACE AS SUPPORT **/ - if (get_plane().normal.dot(n) > _FACE_IS_VALID_SUPPORT_TRESHOLD) { + if (get_plane().normal.dot(n) > _FACE_IS_VALID_SUPPORT_THRESHOLD) { *p_count = MIN(3, p_max); @@ -318,7 +318,7 @@ void Face3::get_support(const Vector3 &p_normal, const Transform &p_transform, V // check if edge is valid as a support real_t dot = (vertex[i] - vertex[(i + 1) % 3]).normalized().dot(n); dot = ABS(dot); - if (dot < _EDGE_IS_VALID_SUPPORT_TRESHOLD) { + if (dot < _EDGE_IS_VALID_SUPPORT_THRESHOLD) { *p_count = MIN(2, p_max); |