Use integer for loop counter instead of float

Change-Id: Iafaccbb3a3a7cbe0d67ed6827906d713c37ce89b
This commit is contained in:
Kenny Root
2010-05-13 12:15:09 -07:00
parent 9ef0f0d9d2
commit b79781af1e

View File

@@ -190,7 +190,7 @@ public final class VelocityTracker implements Poolable<VelocityTracker> {
final long oldestTime = pastTime[oldestTouch];
float accumX = 0;
float accumY = 0;
float N = (lastTouch - oldestTouch + NUM_PAST) % NUM_PAST + 1;
int N = (lastTouch - oldestTouch + NUM_PAST) % NUM_PAST + 1;
// Skip the last received event, since it is probably pretty noisy.
if (N > 3) N--;