@@ -353,9 +353,9 @@ void ViewportRotationControl::_draw_axis(const Axis2D &p_axis) {
353353 // Draw axis lines for the positive axes.
354354 const Vector2 center = get_size () / 2.0 ;
355355 const Vector2 diff = p_axis.screen_point - center;
356- const float line_length = MAX (diff.length () - AXIS_CIRCLE_RADIUS - 0.5 * EDSCALE, 0 );
356+ const real_t line_length = MAX (diff.length () - ( AXIS_CIRCLE_RADIUS + 0 .5f * EDSCALE) , 0 );
357357
358- draw_line (center + diff.limit_length (0.5 * EDSCALE), center + diff.limit_length (line_length), c, 1.5 * EDSCALE, true );
358+ draw_line (center + diff.limit_length (0 .5f * EDSCALE), center + diff.limit_length (line_length), c, 1 .5f * EDSCALE, true );
359359
360360 draw_circle (p_axis.screen_point , AXIS_CIRCLE_RADIUS, c, true , -1.0 , true );
361361
@@ -374,8 +374,8 @@ void ViewportRotationControl::_draw_axis(const Axis2D &p_axis) {
374374}
375375
376376void ViewportRotationControl::_get_sorted_axis (Vector<Axis2D> &r_axis) {
377- const Vector2 center = get_size () / 2.0 ;
378- const real_t radius = get_size ().x / 2.0 - AXIS_CIRCLE_RADIUS - 2.0 * EDSCALE;
377+ const Vector2 center = get_size () / 2 .0f ;
378+ const real_t radius = get_size ().x / 2 .0f - AXIS_CIRCLE_RADIUS - 2 .0f * EDSCALE;
379379 const Basis camera_basis = viewport->to_camera_transform (viewport->cursor ).get_basis ().inverse ();
380380
381381 for (int i = 0 ; i < 3 ; ++i) {
@@ -430,7 +430,7 @@ void ViewportRotationControl::_process_click(int p_index, Vector2 p_position, bo
430430
431431void ViewportRotationControl::_process_drag (Ref<InputEventWithModifiers> p_event, int p_index, Vector2 p_position, Vector2 p_relative_position) {
432432 Point2 mouse_pos = get_local_mouse_position ();
433- const bool movement_threshold_passed = original_mouse_pos.distance_to (mouse_pos) > 4 * EDSCALE;
433+ const bool movement_threshold_passed = original_mouse_pos.distance_to (mouse_pos) > 4 . 0f * EDSCALE;
434434 if (orbiting_index == p_index && gizmo_activated && movement_threshold_passed) {
435435 if (Input::get_singleton ()->get_mouse_mode () == Input::MOUSE_MODE_VISIBLE) {
436436 Input::get_singleton ()->set_mouse_mode (Input::MOUSE_MODE_CAPTURED);
@@ -2220,7 +2220,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
22202220 if (change_nav_from_shortcut != NAVIGATION_NONE) {
22212221 nav_mode = change_nav_from_shortcut;
22222222 } else {
2223- const bool movement_threshold_passed = _edit.original_mouse_pos .distance_to (_edit.mouse_pos ) > 8 * EDSCALE;
2223+ const bool movement_threshold_passed = _edit.original_mouse_pos .distance_to (_edit.mouse_pos ) > 8 . 0f * EDSCALE;
22242224
22252225 if ((selection_in_progress || clicked_wants_append) && movement_threshold_passed && clicked.is_valid ()) {
22262226 cursor.region_select = true ;
0 commit comments