summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data/LocationClustering.java
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 10:21:58 +0800
commit4e05190c04eab6f4700c557ae488f3d7e344d29c (patch)
tree824dcc1b3ea982629a6d9e2e3517f0c7790fdd7f /src/com/android/gallery3d/data/LocationClustering.java
parent3d2225f6b0ff7f65620feaa283415a045718ffeb (diff)
downloadandroid_packages_apps_Snap-4e05190c04eab6f4700c557ae488f3d7e344d29c.tar.gz
android_packages_apps_Snap-4e05190c04eab6f4700c557ae488f3d7e344d29c.tar.bz2
android_packages_apps_Snap-4e05190c04eab6f4700c557ae488f3d7e344d29c.zip
Use FloatMath instead of Math.
Change-Id: I41661b231f6c034dbca6af26d5950eda6c5fc7da
Diffstat (limited to 'src/com/android/gallery3d/data/LocationClustering.java')
-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;