diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2017-07-08 22:12:18 +0700 |
---|---|---|
committer | Poommetee Ketson <poommetee@protonmail.com> | 2017-07-08 22:24:56 +0700 |
commit | 2fd204c35e6883d36d4c15adbe6725ffffd73c6f (patch) | |
tree | 2d1c630fe0f08014cfe8cca04fab9b1082c31aeb /editor/plugins/collision_polygon_2d_editor_plugin.cpp | |
parent | 0067982f5ece3145c00e2f4c0bc092d1ec28c8b3 (diff) | |
download | redot-engine-2fd204c35e6883d36d4c15adbe6725ffffd73c6f.tar.gz |
Refactor 'treshold' to 'threshold'
Diffstat (limited to 'editor/plugins/collision_polygon_2d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/collision_polygon_2d_editor_plugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp index 43abea0131..abee3ead71 100644 --- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp @@ -112,7 +112,7 @@ bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) Vector<Vector2> poly = node->get_polygon(); //first check if a point is to be added (segment split) - real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8); + real_t grab_threshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8); switch (mode) { @@ -131,7 +131,7 @@ bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) return true; } else { - if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) { + if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) { //wip closed _wip_close(); @@ -185,7 +185,7 @@ bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) continue; //not valid to reuse point real_t d = cp.distance_to(gpoint); - if (d < closest_dist && d < grab_treshold) { + if (d < closest_dist && d < grab_threshold) { closest_dist = d; closest_pos = cp; closest_idx = i; @@ -214,7 +214,7 @@ bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) Vector2 cp = xform.xform(poly[i]); real_t d = cp.distance_to(gpoint); - if (d < closest_dist && d < grab_treshold) { + if (d < closest_dist && d < grab_threshold) { closest_dist = d; closest_pos = cp; closest_idx = i; @@ -259,7 +259,7 @@ bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) Vector2 cp = xform.xform(poly[i]); real_t d = cp.distance_to(gpoint); - if (d < closest_dist && d < grab_treshold) { + if (d < closest_dist && d < grab_threshold) { closest_dist = d; closest_pos = cp; closest_idx = i; |