mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 19:08:05 +08:00
New node: Morph (#1576)
* Add morph node * Range slider time parameter, better lerping * Lerp more fill and stroke parameters --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -853,7 +853,7 @@ impl Color {
|
||||
///
|
||||
/// T must be between 0 and 1.
|
||||
#[inline(always)]
|
||||
pub fn lerp(self, other: Color, t: f32) -> Self {
|
||||
pub fn lerp(&self, other: &Color, t: f32) -> Self {
|
||||
assert!((0. ..=1.).contains(&t));
|
||||
Color::from_rgbaf32_unchecked(
|
||||
self.red + ((other.red - self.red) * t),
|
||||
|
||||
Reference in New Issue
Block a user