]> git.mxchange.org Git - flightgear.git/commitdiff
MSVC doesn't have a round function
authorfredb <fredb>
Mon, 14 Jul 2008 09:48:09 +0000 (09:48 +0000)
committerfredb <fredb>
Mon, 14 Jul 2008 09:48:09 +0000 (09:48 +0000)
src/ATC/trafficcontrol.cxx

index 85270f32e0271be72d1e0be8a5ec02426dbb691e..9d76e51a2454febb6d328237252d5886efada894 100644 (file)
@@ -397,7 +397,7 @@ void FGATCController::transmit(FGTrafficRecord *rec, AtcMsgId msgId, AtcMsgDir m
                break;
     }
     double currFreq = fgGetDouble("/instrumentation/comm/frequencies/selected-mhz");
-    int currFreqI = (int) round(currFreq * 100);
+    int currFreqI = (int) floor(currFreq * 100 + 0.5);
     //cerr << "Using " << currFreqI << " and " << commFreq << endl;
     if (currFreqI == commFreq) {
         fgSetString("/sim/messages/atc", text.c_str());