Skip to content

Commit

Permalink
simplified wrapping logic
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMcLean committed Dec 6, 2016
1 parent 1608066 commit 4959ab4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public int wrapY(int y) {
}

public int wrap(int coord, int max) {
return coord < 0 ? wrap(coord + max, max) : coord % max;
return (coord % max + max) % max;
}

public GameWorld(long SEED) {
Expand Down

0 comments on commit 4959ab4

Please sign in to comment.