Refactor 'treshold' to 'threshold'

This commit is contained in:
Poommetee Ketson 2017-07-08 22:12:18 +07:00
parent 0067982f5e
commit 2fd204c35e
44 changed files with 182 additions and 184 deletions

View file

@ -197,7 +197,7 @@ Variant RayShape2DSW::get_data() const {
void SegmentShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const {
if (Math::abs(p_normal.dot(n)) > _SEGMENT_IS_VALID_SUPPORT_TRESHOLD) {
if (Math::abs(p_normal.dot(n)) > _SEGMENT_IS_VALID_SUPPORT_THRESHOLD) {
r_supports[0] = a;
r_supports[1] = b;
r_amount = 2;
@ -337,7 +337,7 @@ void RectangleShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_suppor
Vector2 ag;
ag[i] = 1.0;
real_t dp = ag.dot(p_normal);
if (Math::abs(dp) < _SEGMENT_IS_VALID_SUPPORT_TRESHOLD)
if (Math::abs(dp) < _SEGMENT_IS_VALID_SUPPORT_THRESHOLD)
continue;
real_t sgn = dp > 0 ? 1.0 : -1.0;
@ -400,7 +400,7 @@ void CapsuleShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports
real_t d = n.y;
if (Math::abs(d) < (1.0 - _SEGMENT_IS_VALID_SUPPORT_TRESHOLD)) {
if (Math::abs(d) < (1.0 - _SEGMENT_IS_VALID_SUPPORT_THRESHOLD)) {
// make it flat
n.y = 0.0;
@ -547,7 +547,7 @@ void ConvexPolygonShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_su
}
//test segment
if (points[i].normal.dot(p_normal) > _SEGMENT_IS_VALID_SUPPORT_TRESHOLD) {
if (points[i].normal.dot(p_normal) > _SEGMENT_IS_VALID_SUPPORT_THRESHOLD) {
r_amount = 2;
r_supports[0] = points[i].pos;