aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/line_2d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-07-08 23:51:53 +0200
committerGitHub2017-07-08 23:51:53 +0200
commitd23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00 (patch)
tree7b83394ae29c9e2d195892aece1a26f451376e21 /editor/plugins/line_2d_editor_plugin.cpp
parente577c5b0705168177943fcdf9a0b66c1f8f864f3 (diff)
parent2fd204c35e6883d36d4c15adbe6725ffffd73c6f (diff)
downloadgodot-d23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00.tar.gz
godot-d23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00.tar.zst
godot-d23fc16b2d91fec1b6c9d97c4429bdbd09d4eb00.zip
Merge pull request #9564 from Noshyaar/pr-threshold
Refactor 'treshold' to 'threshold'
Diffstat (limited to '')
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 76906a5b9..4a7ad74fb 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -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;
}
}