[wpimath] Fix clang-tidy bugprone-integer-division warning (#3966)

The integer conversion is deliberate.
This commit is contained in:
Tyler Veness
2022-01-26 18:38:45 -08:00
committed by GitHub
parent 77e4e81e1e
commit eb4d183e48

View File

@@ -146,7 +146,7 @@ void AssertCentralResults(F&& f, DfDx&& dfdx, units::second_t h, double min,
// half the window size in the past.
// The order of accuracy is O(h^(N - d)) where N is number of stencil
// points and d is order of derivative
EXPECT_NEAR(dfdx((i - (Samples - 1) / 2) * h.value()),
EXPECT_NEAR(dfdx((i - static_cast<int>((Samples - 1) / 2)) * h.value()),
filter.Calculate(f(i * h.value())),
std::pow(h.value(), Samples - Derivative));
}