diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-24 13:04:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 13:04:42 +0200 |
commit | 32ab77ef8f537b2f2d0e4c6c0e6127ea9c2a20f4 (patch) | |
tree | a2753d806d05877c5d353bef2049ed822d4ca27a /editor/plugins | |
parent | b8a6eb6d9b8eeb29db37d9ddfb6b48947b8a92a7 (diff) | |
parent | a1f616dcfc9b4efa08a5e69e1b979ea7911dc1f8 (diff) |
Merge pull request #52430 from AnilBK/vector2-replacements
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 1758ba7048..faa3b58dbb 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2927,7 +2927,7 @@ void CanvasItemEditor::_draw_ruler_tool() { viewport->draw_string(font, text_pos, TS->format_number(vformat("%.1f px", length_vector.length())), HALIGN_LEFT, -1, font_size, font_color, outline_size, outline_color); if (draw_secondary_lines) { - const real_t horizontal_angle_rad = atan2(length_vector.y, length_vector.x); + const real_t horizontal_angle_rad = length_vector.angle(); const real_t vertical_angle_rad = Math_PI / 2.0 - horizontal_angle_rad; const int horizontal_angle = round(180 * horizontal_angle_rad / Math_PI); const int vertical_angle = round(180 * vertical_angle_rad / Math_PI); |