summaryrefslogtreecommitdiffstats
path: root/test-runner
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-10-02 10:18:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-02 10:18:29 +0000
commitee665151a4c6359cbfbb9a6795aa9097c4622083 (patch)
tree42274866ba592cd70031f4e32f7e3a9399d38a35 /test-runner
parent152d9aae631381ea28f5701168d372a1486a7502 (diff)
parent0c1faf43aecadc37b78c4ad6cb669eb351d21385 (diff)
downloadframeworks_base-ee665151a4c6359cbfbb9a6795aa9097c4622083.zip
frameworks_base-ee665151a4c6359cbfbb9a6795aa9097c4622083.tar.gz
frameworks_base-ee665151a4c6359cbfbb9a6795aa9097c4622083.tar.bz2
am 0c1faf43: Merge "Switch from FloatMath -> Math and Math.hypot where possible"
* commit '0c1faf43aecadc37b78c4ad6cb669eb351d21385': Switch from FloatMath -> Math and Math.hypot where possible
Diffstat (limited to 'test-runner')
-rw-r--r--test-runner/src/android/test/TouchUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-runner/src/android/test/TouchUtils.java b/test-runner/src/android/test/TouchUtils.java
index acbde0b..0fbffcd 100644
--- a/test-runner/src/android/test/TouchUtils.java
+++ b/test-runner/src/android/test/TouchUtils.java
@@ -576,7 +576,7 @@ public class TouchUtils {
final int fromX = xy[0];
final int fromY = xy[1];
- int distance = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ int distance = (int) Math.hypot(deltaX, deltaY);
drag(test, fromX, fromX + deltaX, fromY, fromY + deltaY, distance);
@@ -629,7 +629,7 @@ public class TouchUtils {
int deltaX = fromX - toX;
int deltaY = fromY - toY;
- int distance = (int)Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ int distance = (int)Math.hypot(deltaX, deltaY);
drag(test, fromX, toX, fromY, toY, distance);
return distance;