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
2014-10-02 16:48:11 +01:00
parent 3a9f3a7806
commit ac04ec9f1a
8 changed files with 15 additions and 24 deletions
+2 -2
View File
@@ -637,8 +637,8 @@ public class FocusHelper {
boolean satisfiesRow = (lineDelta < 0) ? (tmpLp.cellY < row) : (tmpLp.cellY > row);
if (satisfiesRow &&
(newV instanceof BubbleTextView || newV instanceof FolderIcon)) {
float tmpDistance = (float) Math.sqrt(Math.pow(tmpLp.cellX - lp.cellX, 2) +
Math.pow(tmpLp.cellY - lp.cellY, 2));
float tmpDistance = (float) Math.hypot(
tmpLp.cellX - lp.cellX, tmpLp.cellY - lp.cellY);
if (tmpDistance < closestDistance) {
closestIndex = index;
closestDistance = tmpDistance;