From 0ba8d397995ef955ae5ee99a11355a2c65e16fd8 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 7 Oct 2015 21:07:57 +0200 Subject: Revert "accela: guard against negative value overflow properly" This reverts commit d626a60eca7a511786435ec796d7864c59463939. --- ftnoir_filter_accela/ftnoir_filter_accela.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp index acb196c8..ab5fda07 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp @@ -98,7 +98,7 @@ void FTNoIR_Filter::filter(const double* input, double *output) const double thres = i >= 3 ? rot_t : trans_t; const double val = m.getValue(vec_ / thres); const double result = last_output[i] + (vec < 0 ? -1 : 1) * dt * val; - const bool negp = in < 0.; + const bool negp = vec < 0.; const bool done = negp ? result <= in : result >= in; -- cgit v1.2.3