From 34daa4de0bf5e4e216b4a2860ff17f7f6a88b711 Mon Sep 17 00:00:00 2001 From: Edward d'Auvergne Date: Thu, 11 Feb 2016 12:34:13 +0100 Subject: [PATCH] HUD fix for MSVC math.h incompatibility with C-99 and the round() function. --- src/Main/fg_props.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index f348bc3bd..3558b7494 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -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::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::round((min-int(min))*1000)), c); } } else { -- 2.39.5