From 3b97bf79887cb02bf4708a78c8de16440784a329 Mon Sep 17 00:00:00 2001 From: iillyyaa2033 Date: Tue, 23 Jul 2019 11:59:58 +0300 Subject: [PATCH] Remove calls of some FloatMath methods --- com/watabou/utils/PointF.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com/watabou/utils/PointF.java b/com/watabou/utils/PointF.java index c29f1f1..5672cb3 100644 --- a/com/watabou/utils/PointF.java +++ b/com/watabou/utils/PointF.java @@ -83,8 +83,8 @@ public PointF set( float v ) { } public PointF polar( float a, float l ) { - this.x = l * FloatMath.cos( a ); - this.y = l * FloatMath.sin( a ); + this.x = l * (float) Math.cos( a ); + this.y = l * (float) Math.sin( a ); return this; } @@ -118,7 +118,7 @@ public Point floor() { } public float length() { - return FloatMath.sqrt( x * x + y * y ); + return (float) Math.sqrt( x * x + y * y ); } public static PointF sum( PointF a, PointF b ) { @@ -136,7 +136,7 @@ public static PointF inter( PointF a, PointF b, float d ) { public static float distance( PointF a, PointF b ) { float dx = a.x - b.x; float dy = a.y - b.y; - return FloatMath.sqrt( dx * dx + dy * dy ); + return (float) Math.sqrt( dx * dx + dy * dy ); } public static float angle( PointF start, PointF end ) {