From f3d02f62108c5838abcdf8bfe8bd4e4d3233f500 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 12 May 2022 13:44:01 +0200 Subject: [PATCH] Fix updated exponential smoothing --- src/param/smoothing.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/param/smoothing.rs b/src/param/smoothing.rs index f71aa752..8e3948fb 100644 --- a/src/param/smoothing.rs +++ b/src/param/smoothing.rs @@ -177,7 +177,7 @@ impl Smoother { // multiplied by, while the target value is multipled by one minus the coefficient. This // reaches 99.99% of the target value after `steps_left`. The smoother will snap to the // target value after that point. - SmoothingStyle::Exponential(_) => 0.0001f32.powf(-1.0 / steps_left as f32), + SmoothingStyle::Exponential(_) => nih_dbg!(0.0001f32.powf(1.0 / steps_left as f32)), }; } @@ -421,4 +421,6 @@ mod tests { assert_ne!(smoother.next(), 20); assert_eq!(smoother.next(), 20); } + + // TODO: Tests for the exponential smoothing }