summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/PositionController.java
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-02-10 17:08:58 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-10 17:08:58 -0800
commit1e33de955973996db59f08db6b843d9cd732c631 (patch)
tree8c5da11a1409d25964dd4354455c8a72fa9f8c0a /src/com/android/gallery3d/ui/PositionController.java
parente1e40b31bfce1885fb96edd1f92016cd73077d36 (diff)
downloadandroid_packages_apps_Snap-1e33de955973996db59f08db6b843d9cd732c631.tar.gz
android_packages_apps_Snap-1e33de955973996db59f08db6b843d9cd732c631.tar.bz2
android_packages_apps_Snap-1e33de955973996db59f08db6b843d9cd732c631.zip
Revert "Use FloatMath instead of Math."
This reverts commit 6bb8b2eb8695c042798f0eb798032cd30d642a65
Diffstat (limited to 'src/com/android/gallery3d/ui/PositionController.java')
-rw-r--r--src/com/android/gallery3d/ui/PositionController.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/ui/PositionController.java b/src/com/android/gallery3d/ui/PositionController.java
index 68cbbee5f..b4dac973f 100644
--- a/src/com/android/gallery3d/ui/PositionController.java
+++ b/src/com/android/gallery3d/ui/PositionController.java
@@ -406,7 +406,7 @@ class PositionController {
// force it to be in the center.
// (We do for height only, not width, because the user may
// want to scroll to the previous/next image.)
- if (FloatMath.floor(mImageH * mToScale) <= mViewH) {
+ if (Math.floor(mImageH * mToScale) <= mViewH) {
mToY = mImageH / 2;
}
@@ -582,19 +582,19 @@ class PositionController {
private void calculateStableBound(float scale, float horizontalSlack) {
// The number of pixels between the center of the view
// and the edge when the edge is aligned.
- mBoundLeft = (int) FloatMath.ceil((mViewW - horizontalSlack) / (2 * scale));
+ mBoundLeft = (int) Math.ceil((mViewW - horizontalSlack) / (2 * scale));
mBoundRight = mImageW - mBoundLeft;
- mBoundTop = (int) FloatMath.ceil(mViewH / (2 * scale));
+ mBoundTop = (int) Math.ceil(mViewH / (2 * scale));
mBoundBottom = mImageH - mBoundTop;
// If the scaled height is smaller than the view height,
// force it to be in the center.
- if (FloatMath.floor(mImageH * scale) <= mViewH) {
+ if (Math.floor(mImageH * scale) <= mViewH) {
mBoundTop = mBoundBottom = mImageH / 2;
}
// Same for width
- if (FloatMath.floor(mImageW * scale) <= mViewW) {
+ if (Math.floor(mImageW * scale) <= mViewW) {
mBoundLeft = mBoundRight = mImageW / 2;
}
}