From: mfranz Date: Wed, 24 Jan 2007 23:39:48 +0000 (+0000) Subject: Maik JUSTUS: add a missing pair of parens and rounding X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c32ffcd3c9e00ae0980a1c456406f85e27939ca1;p=flightgear.git Maik JUSTUS: add a missing pair of parens and rounding --- diff --git a/src/AIModel/AIMultiplayer.cxx b/src/AIModel/AIMultiplayer.cxx index 8e59b929f..70cf081ec 100755 --- a/src/AIModel/AIMultiplayer.cxx +++ b/src/AIModel/AIMultiplayer.cxx @@ -276,8 +276,8 @@ void FGAIMultiplayer::update(double dt) case SGPropertyNode::INT: case SGPropertyNode::BOOL: case SGPropertyNode::LONG: - ival = (int) (1-tau)*((double) (*prevPropIt)->int_value) + - tau*((double) (*nextPropIt)->int_value); + ival = (int) (0.5+(1-tau)*((double) (*prevPropIt)->int_value) + + tau*((double) (*nextPropIt)->int_value)); pIt->second->setIntValue(ival); //cout << "Int: " << ival << "\n"; break;