Java chunk negative number problem
- by user1990950
I've got a tile based map, which is divided in chunks. I got a method, which puts tiles in this map and with positive numbers it's working. But when using negative numbers it wont work. This is my setTile method:
public static void setTile(int x, int y, Tile tile)
{
int chunkX = x / Chunk.CHUNK_SIZE, chunkY = y / Chunk.CHUNK_SIZE;
…