diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2020-03-16 05:07:33 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2020-04-29 04:02:49 -0400 |
commit | 540156b387270215f513a68b1cf9ffc909ac381b (patch) | |
tree | e5c7f89c9c70294dd1a5aac5461fbb9170868578 /scene/gui | |
parent | ad3c3e1bbbdbf47fca6d775e01867820040d84f1 (diff) |
[Core] Rename linear_interpolate to lerp
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/gradient_edit.cpp | 2 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
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<InputEvent> &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<Vector2> &points, Vector<Color> &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); } |