diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-31 18:00:53 +0200 |
|---|---|---|
| committer | DaMichel <mw.pub@welter-4d.de> | 2016-08-02 13:22:53 +0200 |
| commit | 7dfed29631b5568a203fb1c5052748ab831476ac (patch) | |
| tree | 13f616af87d1612d7a626562f66d2506251f561f | |
| parent | b811a94194990b004196f0dbf0741079da6d34fb (diff) | |
filter/kalman: fix typo
The "abs" in global namespace is an integer-only version. Use "fabs" from
cmath instead.
| -rw-r--r-- | filter-kalman/kalman.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/filter-kalman/kalman.cpp b/filter-kalman/kalman.cpp index 660bc0cc..7e2050b0 100644 --- a/filter-kalman/kalman.cpp +++ b/filter-kalman/kalman.cpp @@ -5,7 +5,6 @@ * copyright notice and this permission notice appear in all copies. */ #include "kalman.h" -#include "opentrack/plugin-api.hpp" #include <QDebug> #include <cmath> @@ -95,7 +94,7 @@ PoseVector DeadzoneFilter::filter(const PoseVector &input) if (dz > 0.) { const double delta = input[i] - last_output[i]; - const double f = pow(abs(delta) / dz, settings::deadzone_exponent); + const double f = std::pow(std::fabs(delta) / dz, settings::deadzone_exponent); const double response = f / (f + 1.) * delta; out[i] = last_output[i] + response; } |
