summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/CropView.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 07:20:05 +0800
commite1e40b31bfce1885fb96edd1f92016cd73077d36 (patch)
tree5df2e2c294f0f7c65ea75452d44d564780bf38e9 /src/com/android/gallery3d/ui/CropView.java
parentfeef78c1ecf63c88e052698040e809f25ffef0c4 (diff)
downloadandroid_packages_apps_Snap-e1e40b31bfce1885fb96edd1f92016cd73077d36.tar.gz
android_packages_apps_Snap-e1e40b31bfce1885fb96edd1f92016cd73077d36.tar.bz2
android_packages_apps_Snap-e1e40b31bfce1885fb96edd1f92016cd73077d36.zip
Use FloatMath instead of Math.
Change-Id: I26eb6a554f72c13ba2801ce35ef0cf2a1466a97b
Diffstat (limited to 'src/com/android/gallery3d/ui/CropView.java')
-rw-r--r--src/com/android/gallery3d/ui/CropView.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/ui/CropView.java b/src/com/android/gallery3d/ui/CropView.java
index 71fdaab96..227e67e11 100644
--- a/src/com/android/gallery3d/ui/CropView.java
+++ b/src/com/android/gallery3d/ui/CropView.java
@@ -31,6 +31,7 @@ import android.graphics.RectF;
import android.media.FaceDetector;
import android.os.Handler;
import android.os.Message;
+import android.util.FloatMath;
import android.view.MotionEvent;
import android.view.animation.DecelerateInterpolator;
import android.widget.Toast;
@@ -756,8 +757,7 @@ public class CropView extends GLView {
int rotation = mImageRotation;
int width = bitmap.getWidth();
int height = bitmap.getHeight();
- float scale = (float) Math.sqrt(
- (double) FACE_PIXEL_COUNT / (width * height));
+ float scale = FloatMath.sqrt((float) FACE_PIXEL_COUNT / (width * height));
// faceBitmap is a correctly rotated bitmap, as viewed by a user.
Bitmap faceBitmap;