diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-18 12:08:11 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-18 12:08:11 +0100 |
commit | c60ae88d68830ef73643e493be76d954c50d9afe (patch) | |
tree | c7b42367c7f0340717e6b7ab26a8009eb96b7713 | |
parent | 9e4e174fb1dd2428cac98667e8054e8e063781f7 (diff) |
filter/accela: use the correct magic value
It's only a coincidence 1.5 is the slider's max value.
-rw-r--r-- | filter-accela/ftnoir_filter_accela.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp index 9a3dbcff..fe4a081c 100644 --- a/filter-accela/ftnoir_filter_accela.cpp +++ b/filter-accela/ftnoir_filter_accela.cpp @@ -85,8 +85,10 @@ void accela::filter(const double* input, double *output) std::fabs(nl.cur() - 1) > 5e-3 && vec < nl.max(); + static constexpr double nl_end = 1.5; + if (should_apply_rot_nonlinearity) - return std::pow(out_/nl.max(), nl.cur()) * nl.max(); + return std::pow(out_/nl_end, nl.cur()) * nl_end; else return out_; ); |