From 1ac712fa65c42e8b4945650bfe22c8b0f063b624 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 17 May 2016 16:04:03 -0300 Subject: [PATCH] AP_Math: fix is_zero() after template conversion --- libraries/AP_Math/AP_Math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Math/AP_Math.h b/libraries/AP_Math/AP_Math.h index 01d47838fe..5d61a24718 100644 --- a/libraries/AP_Math/AP_Math.h +++ b/libraries/AP_Math/AP_Math.h @@ -34,7 +34,7 @@ template inline bool is_zero(const T fVal1) { static_assert(std::is_floating_point::value || std::is_base_of::value, "Template parameter not of type float"); - return fabsf(fVal1) < std::numeric_limits::epsilon() ? true : false; + return fabsf(static_cast(fVal1)) < FLT_EPSILON ? true : false; } /*