diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-16 05:02:19 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-16 05:02:19 +0200 |
commit | 2b755b20caeae9f3b2ce4471e872204335e9db70 (patch) | |
tree | 17a38f0ed0f12af7b1ada2c113fe84bd7f717503 | |
parent | 8bab49e4bccb8f4a43d59d642a0501d80a9235d0 (diff) |
filter/accela: fix clamp regression
Clean up after 632cd5bf7778cb9062633f8d27ecd6aadcaa5d28.
The condition was inverting, causing great pain and woe.
Issue: #620.
-rw-r--r-- | filter-accela/ftnoir_filter_accela.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp index b8a0ac77..b95de697 100644 --- a/filter-accela/ftnoir_filter_accela.cpp +++ b/filter-accela/ftnoir_filter_accela.cpp @@ -154,7 +154,7 @@ void accela::filter(const double* input, double *output) output[k] *= dt; output[k] += last_output[k]; - if (signum(last_output[k] - output[k]) < 0) + if (signum(last_output[k] - output[k]) >= 0) output[k] = std::fmax(input[k], output[k]); else output[k] = std::fmin(input[k], output[k]); |