aboutsummaryrefslogtreecommitdiffstats
path: root/src/interpolation.rs
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar /dev/urandom <johnfkennedymaili2p>2025-02-15 01:46:19 +0100
committerLibravatarLarge Libravatar /dev/urandom <johnfkennedymaili2p>2025-02-15 01:46:19 +0100
commitf12e249c73f021d57d69d5f93d27e03259982edf (patch)
treed78de03146356df5c965433cc4f7f53b9f62579e /src/interpolation.rs
parenta903bb7268fb95ea525a24bc8dd251e00312e149 (diff)
downloadcosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.tar.gz
cosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.tar.bz2
cosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.tar.lz
cosin25-invite-mountainbytes-f12e249c73f021d57d69d5f93d27e03259982edf.zip

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

Diffstat (limited to 'src/interpolation.rs')
-rw-r--r--src/interpolation.rs9
1 files changed, 3 insertions, 6 deletions
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<ValueType: Copy> AnimationTrack<ValueType> {
}
fn get_first_last(&self) -> Option<(KeyFrame<ValueType>, KeyFrame<ValueType>)> {
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<ValueType> {
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,
- }
+ ))
}
}