summaryrefslogtreecommitdiffstats
path: root/core/java/android/util
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-10-02 11:48:08 +0100
committerNeil Fuller <nfuller@google.com>2014-10-02 11:48:08 +0100
commitf7cf5d43aa13405f9d0dd54f6038f710a0423323 (patch)
tree76f33c6e39a9ca49ff9c1d9d776cb86115bc7ff3 /core/java/android/util
parent92c414724f84e32df3c0f79ce11e37ef3d481611 (diff)
parentee665151a4c6359cbfbb9a6795aa9097c4622083 (diff)
downloadframeworks_base-f7cf5d43aa13405f9d0dd54f6038f710a0423323.zip
frameworks_base-f7cf5d43aa13405f9d0dd54f6038f710a0423323.tar.gz
frameworks_base-f7cf5d43aa13405f9d0dd54f6038f710a0423323.tar.bz2
resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
Diffstat (limited to 'core/java/android/util')
-rw-r--r--core/java/android/util/MathUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/util/MathUtils.java b/core/java/android/util/MathUtils.java
index 13a692e..36d5b50 100644
--- a/core/java/android/util/MathUtils.java
+++ b/core/java/android/util/MathUtils.java
@@ -94,7 +94,7 @@ public final class MathUtils {
public static float dist(float x1, float y1, float x2, float y2) {
final float x = (x2 - x1);
final float y = (y2 - y1);
- return (float) Math.sqrt(x * x + y * y);
+ return (float) Math.hypot(x, y);
}
public static float dist(float x1, float y1, float z1, float x2, float y2, float z2) {
@@ -105,7 +105,7 @@ public final class MathUtils {
}
public static float mag(float a, float b) {
- return (float) Math.sqrt(a * a + b * b);
+ return (float) Math.hypot(a, b);
}
public static float mag(float a, float b, float c) {