From: ehofman Date: Wed, 21 Jul 2004 06:56:59 +0000 (+0000) Subject: Fix a numeric_limits problem for older stdc++ libraries. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=73e70fdb29c4c512779b6759d1e6aa487818e841;p=flightgear.git Fix a numeric_limits problem for older stdc++ libraries. --- diff --git a/src/FDM/JSBSim/FGJSBBase.h b/src/FDM/JSBSim/FGJSBBase.h index 9e51d2456..34537f058 100644 --- a/src/FDM/JSBSim/FGJSBBase.h +++ b/src/FDM/JSBSim/FGJSBBase.h @@ -38,7 +38,7 @@ SENTRY INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -#include +#include #ifdef FGFS # include @@ -204,7 +204,7 @@ public: @param b second value to compare @return if the two values can be considered equal up to roundoff */ static bool EqualToRoundoff(double a, double b) { - double eps = 2.0*std::numeric_limits::epsilon(); + double eps = 2.0*DBL_EPSILON; return fabs(a - b) <= eps*max(fabs(a), fabs(b)); } @@ -213,7 +213,7 @@ public: @param b second value to compare @return if the two values can be considered equal up to roundoff */ static bool EqualToRoundoff(float a, float b) { - float eps = 2.0*std::numeric_limits::epsilon(); + float eps = 2.0*FLT_EPSILON; return fabs(a - b) <= eps*max(fabs(a), fabs(b)); }