From c99877ec05b98146c29dc5b57c656bf7ad425330 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 12 Feb 2022 20:54:03 +0100 Subject: [PATCH] Fix Smoother::is_smoothing() --- src/param/smoothing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/param/smoothing.rs b/src/param/smoothing.rs index 67bf66f6..e81b5ea5 100644 --- a/src/param/smoothing.rs +++ b/src/param/smoothing.rs @@ -107,7 +107,7 @@ impl Smoother { // Yes, Clippy, like I said, this was intentional #[allow(clippy::should_implement_trait)] pub fn next(&self) -> f32 { - if self.steps_left.load(Ordering::Relaxed) > 1 { + if self.steps_left.load(Ordering::Relaxed) > 0 { let current = self.current.load(Ordering::Relaxed); // The number of steps usually won't fit exactly, so make sure we don't do weird things @@ -163,7 +163,7 @@ impl Smoother { #[allow(clippy::should_implement_trait)] pub fn next(&mut self) -> i32 { - if self.steps_left.load(Ordering::Relaxed) > 1 { + if self.steps_left.load(Ordering::Relaxed) > 0 { let current = self.current.load(Ordering::Relaxed); // The number of steps usually won't fit exactly, so make sure we don't do weird things