summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2015-04-13 14:32:47 +0100
committerNeil Fuller <nfuller@google.com>2015-04-15 09:10:18 +0100
commitba41458f5c696194d547ac8f24e9f8e58cfa64fc (patch)
treecd26c9eaae3d527225fe8536e965e20aa269a09b /src
parent6da9c32204347d0980d3e76a5ff03bc3431b49a7 (diff)
downloadandroid_packages_apps_Trebuchet-ba41458f5c696194d547ac8f24e9f8e58cfa64fc.tar.gz
android_packages_apps_Trebuchet-ba41458f5c696194d547ac8f24e9f8e58cfa64fc.tar.bz2
android_packages_apps_Trebuchet-ba41458f5c696194d547ac8f24e9f8e58cfa64fc.zip
Remove usage of FloatMath
Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: I2effc3f498fb13e66de9a905b9a40ac5688a5850
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/LauncherScroller.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/launcher3/LauncherScroller.java b/src/com/android/launcher3/LauncherScroller.java
index 3bd0a78c4..a9b49556b 100644
--- a/src/com/android/launcher3/LauncherScroller.java
+++ b/src/com/android/launcher3/LauncherScroller.java
@@ -20,7 +20,6 @@ import android.animation.TimeInterpolator;
import android.content.Context;
import android.hardware.SensorManager;
import android.os.Build;
-import android.util.FloatMath;
import android.view.ViewConfiguration;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
@@ -409,7 +408,7 @@ public class LauncherScroller {
float dx = (float) (mFinalX - mStartX);
float dy = (float) (mFinalY - mStartY);
- float hyp = FloatMath.sqrt(dx * dx + dy * dy);
+ float hyp = (float) Math.hypot(dx, dy);
float ndx = dx / hyp;
float ndy = dy / hyp;
@@ -426,7 +425,7 @@ public class LauncherScroller {
mMode = FLING_MODE;
mFinished = false;
- float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY);
+ float velocity = (float) Math.hypot(velocityX, velocityY);
mVelocity = velocity;
mDuration = getSplineFlingDuration(velocity);