PanInfoHistoryIter historyBegin = history.begin();
PanInfoHistoryIter lastIt = history.end();
bool pointGenerated = false;
+ bool havePreviousPoint = false;
RelativeVectors newAcceleration;
// Iterate through point history to perform interpolation.
divisor += 1.0f / timeDelta;
// Acceleration requires a previous point.
- if( lastIt != history.end() )
+ if( havePreviousPoint )
{
// Time delta of input.
float timeDifference( GetDivisibleTimeDifference( it->time, lastIt->time, 1.0f, OUTPUT_TIME_DIFFERENCE ) );
accelerationDivisor += 1.0f / timeDelta;
}
+ else
+ {
+ havePreviousPoint = true;
+ }
tapsUsed++;
lastIt = it;