Skip to content

Commit

Permalink
Fix compareTo for points close to each other
Browse files Browse the repository at this point in the history
  • Loading branch information
OliviaYtterbrink committed Feb 14, 2018
1 parent bb002b6 commit d1d38d6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -125,7 +125,7 @@ else if ( this.coordinate.length < other.coordinate.length )

for ( int i = 0; i < coordinate.length; i++ )
{
int cmpVal = (int) (this.coordinate[i] - other.coordinate[i]);
int cmpVal = Double.compare(this.coordinate[i], other.coordinate[i]);
if ( cmpVal != 0 )
{
return cmpVal;
Expand Down

0 comments on commit d1d38d6

Please sign in to comment.