diff options
author | Micky <micheledevita2@gmail.com> | 2022-09-05 14:05:50 +0200 |
---|---|---|
committer | Micky <micheledevita2@gmail.com> | 2022-09-06 07:19:20 +0200 |
commit | b6daad8d4b4f828848e8ed778778e11ff92894dd (patch) | |
tree | f19ef0292c7c7071f859942bd9b9c7a02a17e468 /editor/plugins | |
parent | 6c818da55ef1f45eaed06e1413220af1d23a9c41 (diff) |
Rename `range_lerp` to `remap`
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 03cf9abed9..233ce92e4d 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2624,14 +2624,14 @@ void Node3DEditorViewport::_notification(int p_what) { cpu_time_label->add_theme_color_override( "font_color", frame_time_gradient->get_color_at_offset( - Math::range_lerp(cpu_time, 0, 30, 0, 1))); + Math::remap(cpu_time, 0, 30, 0, 1))); gpu_time_label->set_text(vformat(TTR("GPU Time: %s ms"), rtos(gpu_time).pad_decimals(2))); // Middle point is at 15 ms. gpu_time_label->add_theme_color_override( "font_color", frame_time_gradient->get_color_at_offset( - Math::range_lerp(gpu_time, 0, 30, 0, 1))); + Math::remap(gpu_time, 0, 30, 0, 1))); const double fps = 1000.0 / gpu_time; fps_label->set_text(vformat(TTR("FPS: %d"), fps)); @@ -2639,7 +2639,7 @@ void Node3DEditorViewport::_notification(int p_what) { fps_label->add_theme_color_override( "font_color", frame_time_gradient->get_color_at_offset( - Math::range_lerp(fps, 110, 10, 0, 1))); + Math::remap(fps, 110, 10, 0, 1))); } bool show_cinema = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_CINEMATIC_PREVIEW)); |