]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/SGGeod.hxx
Canvas: fix element mouse hit detection with OSG 3.3.2.
[simgear.git] / simgear / math / SGGeod.hxx
index 2ab2b1076c937925842e757b9c506992b516b962..8eddbe92ba5f10c2fb9f20765c96ad9085dd8cf6 100644 (file)
 
 #include <simgear/constants.h>
 
-#ifndef _MSC_VER
-using std::isnan;
-#endif
-
 // #define SG_GEOD_NATIVE_DEGREE
 
 /// Class representing a geodetic location
@@ -356,7 +352,10 @@ inline
 bool
 SGGeod::isValid() const
 {
-  if (isnan(_lon) || isnan(_lat)) return false;
+  if (SGMiscd::isNaN(_lon))
+      return false;
+  if (SGMiscd::isNaN(_lat))
+      return false;
 #ifdef SG_GEOD_NATIVE_DEGREE
   return (_lon >= -180.0) && (_lon <= 180.0) &&
   (_lat >= -90.0) && (_lat <= 90.0);