]> git.mxchange.org Git - flightgear.git/commitdiff
HUD fix for MSVC math.h incompatibility with C-99 and the round() function.
authorEdward d'Auvergne <edward@nmr-relax.com>
Thu, 11 Feb 2016 11:34:13 +0000 (12:34 +0100)
committerStuart Buchanan <stuart_d_buchanan@yahoo.co.uk>
Thu, 11 Feb 2016 19:36:32 +0000 (19:36 +0000)
src/Main/fg_props.cxx

index f348bc3bd02b1e02e250b6fbb7d913d22b67deaa..3558b74940fe0095ae96bb75e7cc241e32700ed5 100644 (file)
@@ -488,9 +488,9 @@ formatLatLongString (double deg, int format, char *buf, char c) {
         deg += 1.0;
     }
     if (c == 'N' || c == 'S') {
-        snprintf(buf, 32, "%02d* %02d'.%03d%c", int(deg), int(min), int(round((min-int(min))*1000)), c);
+        snprintf(buf, 32, "%02d* %02d'.%03d%c", int(deg), int(min), int(SGMisc<double>::round((min-int(min))*1000)), c);
     } else {
-        snprintf(buf, 32, "%03d* %02d'.%03d%c", int(deg), int(min), int(round((min-int(min))*1000)), c);
+        snprintf(buf, 32, "%03d* %02d'.%03d%c", int(deg), int(min), int(SGMisc<double>::round((min-int(min))*1000)), c);
     }
 
   } else {