1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

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

@@ -62,12 +62,12 @@ Vector2 Line2DEditor::mouse_to_local_pos(Vector2 gpoint, bool alt) {
int Line2DEditor::get_point_index_at(Vector2 gpos) {
ERR_FAIL_COND_V(node == 0, -1);
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);
Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
for (int i = 0; i < node->get_point_count(); ++i) {
Point2 p = xform.xform(node->get_point_pos(i));
if (gpos.distance_to(p) < grab_treshold) {
if (gpos.distance_to(p) < grab_threshold) {
return i;
}
}