summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/photoeditor
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-02-10 17:09:31 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-10 17:09:31 -0800
commit3d2225f6b0ff7f65620feaa283415a045718ffeb (patch)
treeb1cdfc59133568896d8fc272d1117411f5a42669 /src/com/android/gallery3d/photoeditor
parentfc2301b560b161c9e7645a4363ef4f71d155b38b (diff)
parent1e33de955973996db59f08db6b843d9cd732c631 (diff)
downloadandroid_packages_apps_Snap-3d2225f6b0ff7f65620feaa283415a045718ffeb.tar.gz
android_packages_apps_Snap-3d2225f6b0ff7f65620feaa283415a045718ffeb.tar.bz2
android_packages_apps_Snap-3d2225f6b0ff7f65620feaa283415a045718ffeb.zip
Merge "Revert "Use FloatMath instead of Math.""
Diffstat (limited to 'src/com/android/gallery3d/photoeditor')
-rw-r--r--src/com/android/gallery3d/photoeditor/RendererUtils.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/com/android/gallery3d/photoeditor/RendererUtils.java b/src/com/android/gallery3d/photoeditor/RendererUtils.java
index 3edcff5f5..b92907df0 100644
--- a/src/com/android/gallery3d/photoeditor/RendererUtils.java
+++ b/src/com/android/gallery3d/photoeditor/RendererUtils.java
@@ -19,7 +19,6 @@ package com.android.gallery3d.photoeditor;
import android.graphics.Bitmap;
import android.opengl.GLES20;
import android.opengl.GLUtils;
-import android.util.FloatMath;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -154,8 +153,8 @@ public class RendererUtils {
public static void setRenderToRotate(RenderContext context, int srcWidth, int srcHeight,
int dstWidth, int dstHeight, float degrees) {
float radian = -degrees * DEGREE_TO_RADIAN;
- float cosTheta = FloatMath.cos(radian);
- float sinTheta = FloatMath.sin(radian);
+ float cosTheta = (float) Math.cos(radian);
+ float sinTheta = (float) Math.sin(radian);
float cosWidth = cosTheta * srcWidth;
float sinWidth = sinTheta * srcWidth;
float cosHeight = cosTheta * srcHeight;
@@ -206,8 +205,8 @@ public class RendererUtils {
System.arraycopy(base, 0, vertices, 0, vertices.length);
if (horizontalDegrees % 180f != 0) {
float radian = (horizontalDegrees - horizontalRounds * 180) * DEGREE_TO_RADIAN;
- float cosTheta = FloatMath.cos(radian);
- float sinTheta = FloatMath.sin(radian);
+ float cosTheta = (float) Math.cos(radian);
+ float sinTheta = (float) Math.sin(radian);
float scale = length / (length + sinTheta * base[0]);
vertices[0] = cosTheta * base[0] * scale;
@@ -224,8 +223,8 @@ public class RendererUtils {
if (verticalDegrees % 180f != 0) {
float radian = (verticalDegrees - verticalRounds * 180) * DEGREE_TO_RADIAN;
- float cosTheta = FloatMath.cos(radian);
- float sinTheta = FloatMath.sin(radian);
+ float cosTheta = (float) Math.cos(radian);
+ float sinTheta = (float) Math.sin(radian);
float scale = length / (length + sinTheta * base[1]);
vertices[0] = base[0] * scale;