Remove dependencies on FloatMath

See frameworks/base commit 33253a4baa6279f81a73425b49dfb6abe5f5416e
for details.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I928b0bee35467acb2f06f774b8d0e49fc2336795
This commit is contained in:
Neil Fuller committed 2014-10-17 16:12:18 +01:00
1 parent 3a9f3a7806
commit ac04ec9f1a
8 files changed
+15 -24

No files matched your search

+1 -2
View File
@@ -612,8 +612,7 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang
final Runnable onCompleteRunnable, final int animationEndStyle, View anchorView) {
// Calculate the duration of the animation based on the object's distance
final float dist = (float) Math.sqrt(Math.pow(to.left - from.left, 2) +
Math.pow(to.top - from.top, 2));
final float dist = (float) Math.hypot(to.left - from.left, to.top - from.top);
final Resources res = getResources();
final float maxDist = (float) res.getInteger(R.integer.config_dropAnimMaxDist);