Skip to content

Commit

Permalink
Improve previous fix
Browse files Browse the repository at this point in the history
In some cases, floor is better than round.
  • Loading branch information
mcmonkey4eva committed Nov 12, 2014
1 parent 75aca2e commit c7eab7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/aufdemrand/denizen/objects/dLocation.java
Expand Up @@ -275,9 +275,9 @@ public boolean equals(Object o) {
if (o == null) return false;
if (!(o instanceof dLocation)) return false;
dLocation other = (dLocation) o;
return Math.round(getX()) == Math.round(other.getX())
&& Math.round(getY()) == Math.round(other.getY())
&& Math.round(getZ()) == Math.round(other.getZ());
return Math.floor(getX()) == Math.floor(other.getX())
&& Math.floor(getY()) == Math.floor(other.getY())
&& Math.floor(getZ()) == Math.floor(other.getZ());
}

String prefix = "Location";
Expand Down

0 comments on commit c7eab7f

Please sign in to comment.