From 540156b387270215f513a68b1cf9ffc909ac381b Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 16 Mar 2020 05:07:33 -0400 Subject: [Core] Rename linear_interpolate to lerp --- scene/gui/gradient_edit.cpp | 2 +- scene/gui/graph_edit.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scene/gui') diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp index 88107f754c..a6ed3d8de9 100644 --- a/scene/gui/gradient_edit.cpp +++ b/scene/gui/gradient_edit.cpp @@ -207,7 +207,7 @@ void GradientEdit::_gui_input(const Ref &p_event) { prev = points[pos]; } - newPoint.color = prev.color.linear_interpolate(next.color, (newPoint.offset - prev.offset) / (next.offset - prev.offset)); + newPoint.color = prev.color.lerp(next.color, (newPoint.offset - prev.offset) / (next.offset - prev.offset)); points.push_back(newPoint); points.sort(); diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 3af730de23..0bf67df9b4 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -653,7 +653,7 @@ void GraphEdit::_bake_segment2d(Vector &points, Vector &colors, if (p_depth >= p_min_depth && (dp < p_tol || p_depth >= p_max_depth)) { points.push_back((beg + end) * 0.5); - colors.push_back(p_color.linear_interpolate(p_to_color, mp)); + colors.push_back(p_color.lerp(p_to_color, mp)); lines++; } else { _bake_segment2d(points, colors, p_begin, mp, p_a, p_out, p_b, p_in, p_depth + 1, p_min_depth, p_max_depth, p_tol, p_color, p_to_color, lines); @@ -737,8 +737,8 @@ void GraphEdit::_connections_layer_draw() { Color tocolor = gto->get_connection_input_color(E->get().to_port); if (E->get().activity > 0) { - color = color.linear_interpolate(activity_color, E->get().activity); - tocolor = tocolor.linear_interpolate(activity_color, E->get().activity); + color = color.lerp(activity_color, E->get().activity); + tocolor = tocolor.lerp(activity_color, E->get().activity); } _draw_cos_line(connections_layer, frompos, topos, color, tocolor); } -- cgit v1.2.3