From 4646762f9dc2fa168143a63275c0e9249c7ce986 Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Fri, 27 Jan 2023 16:39:58 +0300 Subject: [PATCH] Use multiplication instead of division --- src/lib/wind_estimator/WindEstimator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/wind_estimator/WindEstimator.cpp b/src/lib/wind_estimator/WindEstimator.cpp index 4468c00296..ee6c6c9ed8 100644 --- a/src/lib/wind_estimator/WindEstimator.cpp +++ b/src/lib/wind_estimator/WindEstimator.cpp @@ -219,7 +219,7 @@ WindEstimator::run_sanity_checks() // attain symmetry for (unsigned row = 0; row < 3; row++) { for (unsigned column = 0; column < row; column++) { - const float tmp = (_P(row, column) + _P(column, row)) / 2.f; + const float tmp = (_P(row, column) + _P(column, row)) * 0.5f; _P(row, column) = tmp; _P(column, row) = tmp; }