1
0
Fork 0

MSVC doesn't have a round function

This commit is contained in:
fredb 2008-07-14 09:48:09 +00:00
parent cf2bd4003c
commit dce2d5d7cd

View 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());