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; } /*