Fixed the utilities world to local non perfect positive case.

This commit is contained in:
Harrison Deng 2020-04-27 13:51:18 -05:00
parent ec27a9bc10
commit 3efc6acf0b

View File

@ -57,6 +57,7 @@ public class Utilities {
xRes %= CHUNK_SIZE - 1;
} else {
xRes = x % CHUNK_SIZE;
if (xRes > 0) xRes -= 1;
}
int yRes = 0;
if (y < 0) {
@ -64,6 +65,7 @@ public class Utilities {
yRes %= CHUNK_SIZE - 1;
} else {
yRes = y % CHUNK_SIZE;
if (yRes > 0) yRes -= 1;
}
return new Point2(xRes, yRes);
}