summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-02-11 07:19:47 +0800
committerChih-Chung Chang <chihchung@google.com>2012-02-11 07:20:05 +0800
commit6bb8b2eb8695c042798f0eb798032cd30d642a65 (patch)
tree4859906ec4b78bbfaac3f7dc1b28ce10291225c9 /src/com/android/gallery3d/data
parente69eba096c3c88e944471499ca7bb47cf77d3e3c (diff)
downloadandroid_packages_apps_Gallery2-6bb8b2eb8695c042798f0eb798032cd30d642a65.tar.gz
android_packages_apps_Gallery2-6bb8b2eb8695c042798f0eb798032cd30d642a65.tar.bz2
android_packages_apps_Gallery2-6bb8b2eb8695c042798f0eb798032cd30d642a65.zip
Use FloatMath instead of Math.
Change-Id: I26eb6a554f72c13ba2801ce35ef0cf2a1466a97b
Diffstat (limited to 'src/com/android/gallery3d/data')
-rw-r--r--src/com/android/gallery3d/data/LocationClustering.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/data/LocationClustering.java b/src/com/android/gallery3d/data/LocationClustering.java
index 788060cf0..9f3a35890 100644
--- a/src/com/android/gallery3d/data/LocationClustering.java
+++ b/src/com/android/gallery3d/data/LocationClustering.java
@@ -23,6 +23,7 @@ import com.android.gallery3d.util.GalleryUtils;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
+import android.util.FloatMath;
import android.widget.Toast;
import java.util.ArrayList;
@@ -294,7 +295,7 @@ class LocationClustering extends Clustering {
}
// step 5: calculate the final score
- float score = totalDistance * (float) Math.sqrt(realK);
+ float score = totalDistance * FloatMath.sqrt(realK);
if (score < bestScore) {
bestScore = score;