summaryrefslogtreecommitdiffhomepage
path: root/filter-kalman/kalman.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-18 08:52:34 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-18 08:52:34 +0200
commit7df7c40a5d5eaed89fb89445348c3c7cdc8632e9 (patch)
tree49633cc6d74f4f46bb1cd9057570c6b34baa64db /filter-kalman/kalman.cpp
parent39acca95501fa7b0d77f8e6d2cbf97f45cff4ebf (diff)
many: use std::f{max,min} for floating-point values
Diffstat (limited to 'filter-kalman/kalman.cpp')
-rw-r--r--filter-kalman/kalman.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter-kalman/kalman.cpp b/filter-kalman/kalman.cpp
index 5bd520ee..559f1ea5 100644
--- a/filter-kalman/kalman.cpp
+++ b/filter-kalman/kalman.cpp
@@ -76,7 +76,7 @@ void KalmanProcessNoiseScaler::update(KalmanFilter &kf, double dt)
{
alpha = T1 / T2;
alpha = std::sqrt(alpha);
- alpha = std::min(1000., std::max(0.001, alpha));
+ alpha = std::fmin(1000., std::fmax(0.001, alpha));
}
kf.process_noise_cov = alpha * base_cov;
//qDebug() << "alpha = " << alpha;