diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-06 18:16:06 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-06 18:16:06 +0000 |
commit | a24c38d1a814f5bc4979b99d6652f4bf2f2982c7 (patch) | |
tree | 3635c158604917758f663f14f2220ef1a19dfcbb /editor/plugins/canvas_item_editor_plugin.cpp | |
parent | d834789f475d431b10dcaef8804cd75dcd8b47dd (diff) | |
download | redot-engine-a24c38d1a814f5bc4979b99d6652f4bf2f2982c7.tar.gz |
Rename Vector2.tangent() to Vector2.orthogonal()
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index b1bac34f46..981def63c0 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -727,7 +727,7 @@ bool CanvasItemEditor::_get_bone_shape(Vector<Vector2> *shape, Vector<Vector2> * } Vector2 rel = to - from; - Vector2 relt = rel.tangent().normalized() * bone_width; + Vector2 relt = rel.orthogonal().normalized() * bone_width; Vector2 reln = rel.normalized(); Vector2 reltn = relt.normalized(); @@ -1808,7 +1808,7 @@ bool CanvasItemEditor::_gui_input_resize(const Ref<InputEvent> &p_event) { } ofs = (endpoints[i] + endpoints[next]) / 2; - ofs += (endpoints[next] - endpoints[i]).tangent().normalized() * (select_handle->get_size().width / 2); + ofs += (endpoints[next] - endpoints[i]).orthogonal().normalized() * (select_handle->get_size().width / 2); if (ofs.distance_to(b->get_position()) < radius) { resize_drag = dragger[i * 2 + 1]; } @@ -3495,7 +3495,7 @@ void CanvasItemEditor::_draw_selection() { select_handle->draw(ci, (endpoints[i] + ofs - (select_handle->get_size() / 2)).floor()); ofs = (endpoints[i] + endpoints[next]) / 2; - ofs += (endpoints[next] - endpoints[i]).tangent().normalized() * (select_handle->get_size().width / 2); + ofs += (endpoints[next] - endpoints[i]).orthogonal().normalized() * (select_handle->get_size().width / 2); select_handle->draw(ci, (ofs - (select_handle->get_size() / 2)).floor()); } |