Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions com/watabou/utils/PointF.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 ) {
Expand All @@ -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 ) {
Expand Down