1
0
Fork 0

HUD fix for MSVC math.h incompatibility with C-99 and the round() function.

This commit is contained in:
Edward d'Auvergne 2016-02-11 12:34:13 +01:00 committed by Stuart Buchanan
parent e1d0699bdb
commit 34daa4de0b

View 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 {