From: fredb Date: Mon, 14 Jul 2008 09:48:09 +0000 (+0000) Subject: MSVC doesn't have a round function X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dce2d5d7cd59db229228c875e89443ef9eeb070e;p=flightgear.git MSVC doesn't have a round function --- diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index 85270f32e..9d76e51a2 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -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());