From c60ae88d68830ef73643e493be76d954c50d9afe Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 18 Feb 2017 12:08:11 +0100 Subject: filter/accela: use the correct magic value It's only a coincidence 1.5 is the slider's max value. --- filter-accela/ftnoir_filter_accela.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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_; ); -- cgit v1.2.3