diff options
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/ColorMatrix.java | 8 | ||||
-rw-r--r-- | graphics/java/android/graphics/PointF.java | 3 | ||||
-rw-r--r-- | graphics/java/android/graphics/RectF.java | 5 |
3 files changed, 6 insertions, 10 deletions
diff --git a/graphics/java/android/graphics/ColorMatrix.java b/graphics/java/android/graphics/ColorMatrix.java index e3596c8..0bfd07be 100644 --- a/graphics/java/android/graphics/ColorMatrix.java +++ b/graphics/java/android/graphics/ColorMatrix.java @@ -16,8 +16,6 @@ package android.graphics; -import android.util.FloatMath; - /** * 4x5 matrix for transforming the color+alpha components of a Bitmap. * The matrix is stored in a single array, and its treated as follows: @@ -118,9 +116,9 @@ public class ColorMatrix { */ public void setRotate(int axis, float degrees) { reset(); - float radians = degrees * (float)Math.PI / 180; - float cosine = FloatMath.cos(radians); - float sine = FloatMath.sin(radians); + double radians = degrees * Math.PI / 180d; + float cosine = (float) Math.cos(radians); + float sine = (float) Math.sin(radians); switch (axis) { // Rotation around the red color case 0: diff --git a/graphics/java/android/graphics/PointF.java b/graphics/java/android/graphics/PointF.java index ee38dbb..8e4288e 100644 --- a/graphics/java/android/graphics/PointF.java +++ b/graphics/java/android/graphics/PointF.java @@ -18,7 +18,6 @@ package android.graphics; import android.os.Parcel; import android.os.Parcelable; -import android.util.FloatMath; /** @@ -109,7 +108,7 @@ public class PointF implements Parcelable { * Returns the euclidian distance from (0,0) to (x,y) */ public static float length(float x, float y) { - return FloatMath.sqrt(x * x + y * y); + return (float) Math.hypot(x, y); } /** diff --git a/graphics/java/android/graphics/RectF.java b/graphics/java/android/graphics/RectF.java index 53178b0..f5cedfa 100644 --- a/graphics/java/android/graphics/RectF.java +++ b/graphics/java/android/graphics/RectF.java @@ -20,7 +20,6 @@ import java.io.PrintWriter; import android.os.Parcel; import android.os.Parcelable; -import android.util.FloatMath; import com.android.internal.util.FastMath; /** @@ -450,8 +449,8 @@ public class RectF implements Parcelable { * floor of top and left, and the ceiling of right and bottom. */ public void roundOut(Rect dst) { - dst.set((int) FloatMath.floor(left), (int) FloatMath.floor(top), - (int) FloatMath.ceil(right), (int) FloatMath.ceil(bottom)); + dst.set((int) Math.floor(left), (int) Math.floor(top), + (int) Math.ceil(right), (int) Math.ceil(bottom)); } /** |