]> 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 54b2f37fa1643ecc7cb2fa10f8fd366564334a0f..8eddbe92ba5f10c2fb9f20765c96ad9085dd8cf6 100644 (file)
@@ -352,7 +352,10 @@ inline
 bool
 SGGeod::isValid() const
 {
-  if (std::isnan(_lon) || std::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);