Skip to content

Commit b79781a

Browse files
committed
Use integer for loop counter instead of float
Change-Id: Iafaccbb3a3a7cbe0d67ed6827906d713c37ce89b
1 parent 9ef0f0d commit b79781a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/view/VelocityTracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public void computeCurrentVelocity(int units, float maxVelocity) {
190190
final long oldestTime = pastTime[oldestTouch];
191191
float accumX = 0;
192192
float accumY = 0;
193-
float N = (lastTouch - oldestTouch + NUM_PAST) % NUM_PAST + 1;
193+
int N = (lastTouch - oldestTouch + NUM_PAST) % NUM_PAST + 1;
194194
// Skip the last received event, since it is probably pretty noisy.
195195
if (N > 3) N--;
196196

0 commit comments

Comments
 (0)