summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.cpp b/ftnoir_filter_accela/ftnoir_filter_accela.cpp
index 9bac5d58..855cb413 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela.cpp
+++ b/ftnoir_filter_accela/ftnoir_filter_accela.cpp
@@ -115,13 +115,8 @@ 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 = vec < 0.;
- const bool done = negp
- ? result <= in
- : result >= in;
- const double ret = done ? in : result;
- last_output[i] = output[i] = elide_nan(ret, last_output[i]);
+ last_output[i] = output[i] = elide_nan(result, last_output[i]);
}
}