summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-24 15:29:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-24 15:29:55 +0200
commit1ed0822c27d06043a2730b652a195f37b8e57b17 (patch)
tree461809c24d1e0f4a6f000adb5e74b8fa9bb1235c
parent57ba66277c80d89038baeb06f8ff398935724879 (diff)
accela: remove "done" logic
-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]);
}
}