From f12e249c73f021d57d69d5f93d27e03259982edf Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Sat, 15 Feb 2025 01:46:19 +0100 Subject: feat: Marquee, Lower dither opacity at top, DVD Logo should be separate function, Release Builds should work, advance_width should be f64 to save bytes, Vendor Micromod-RS, Add Timing Steps --- src/interpolation.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/interpolation.rs') diff --git a/src/interpolation.rs b/src/interpolation.rs index ecb2c85..448ef43 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -90,7 +90,7 @@ impl AnimationTrack { } fn get_first_last(&self) -> Option<(KeyFrame, KeyFrame)> { let okf = self.get_sorted_keyframes(); - if okf.len() == 0 { + if okf.is_empty() { None } else { Some((*okf.first().unwrap(), *okf.last().unwrap())) @@ -175,14 +175,11 @@ impl< timing_function: TwoValueTimingFunction, ) -> Option { let frames = self.get_current_keyframes(sorted_keyframes, time); - match frames { - Some(frames) => Some(KeyFrame::raw_value_at( + frames.map(|frames| KeyFrame::raw_value_at( &frames.0, &frames.1, time, timing_function, - )), - None => None, - } + )) } } -- cgit v1.2.3