# include <config.h>
#endif
+#include <cmath>
+
#ifdef _MSC_VER
# include <float.h>
-# define finite _finite
-#elif defined(__sun) || defined(sgi)
-# include <ieeefp.h>
+ double fgIsFinite(double x) { return _finite(x); }
+#else
+ double fgIsFinite(double x) { return std::isfinite(x); }
#endif
-#include <math.h>
-
#include <simgear/sg_inlines.h>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/timing/sg_time.hxx>
#include "AIShip.hxx"
+using std::string;
FGAIShip::FGAIShip(object_type ot) :
// allow HOT to be enabled
// now revise the required course for the next way point
_course = getCourse(pos.getLatitudeDeg(), pos.getLongitudeDeg(), curr->getLatitude(), curr->getLongitude());
- if (finite(_course))
+ if (fgIsFinite(_course))
TurnTo(_course);
else
SG_LOG(SG_AI, SG_ALERT, "AIShip: Bearing or Range is not a finite number");