diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-02-11 07:19:47 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2012-02-11 07:20:05 +0800 |
commit | e1e40b31bfce1885fb96edd1f92016cd73077d36 (patch) | |
tree | 5df2e2c294f0f7c65ea75452d44d564780bf38e9 /src/com/android/gallery3d/app/CropImage.java | |
parent | feef78c1ecf63c88e052698040e809f25ffef0c4 (diff) | |
download | android_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/app/CropImage.java')
-rw-r--r-- | src/com/android/gallery3d/app/CropImage.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/CropImage.java b/src/com/android/gallery3d/app/CropImage.java index 5ac9f0251..7e1572f0c 100644 --- a/src/com/android/gallery3d/app/CropImage.java +++ b/src/com/android/gallery3d/app/CropImage.java @@ -38,6 +38,7 @@ import android.os.Handler; import android.os.Message; import android.provider.MediaStore; import android.provider.MediaStore.Images; +import android.util.FloatMath; import android.view.Menu; import android.view.MenuItem; import android.view.Window; @@ -554,8 +555,7 @@ public class CropImage extends AbstractGalleryActivity { } if (outputX * outputY > MAX_PIXEL_COUNT) { - float scale = (float) Math.sqrt( - (double) MAX_PIXEL_COUNT / outputX / outputY); + float scale = FloatMath.sqrt((float) MAX_PIXEL_COUNT / outputX / outputY); Log.w(TAG, "scale down the cropped image: " + scale); outputX = Math.round(scale * outputX); outputY = Math.round(scale * outputY); |