Skip to content

Commit ee1aa66

Browse files
authored
fix grid size calculation formula (#37)
1 parent ea731c8 commit ee1aa66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/journeymap/client/render/map/GridRenderer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,8 @@ private void updateBounds(int width, int height)
590590
}
591591

592592
private void updateGridSize() {
593-
int newGridSizeHeight = (int) Math.ceil(screenBounds.height / Tile.TILESIZE + 0.5);
594-
int newGridSizeWidth = (int) Math.ceil(screenBounds.width / Tile.TILESIZE + 0.5);
593+
int newGridSizeHeight = (int) Math.ceil(screenBounds.height / Tile.TILESIZE) + 1;
594+
int newGridSizeWidth = (int) Math.ceil(screenBounds.width / Tile.TILESIZE) + 1;
595595

596596
setGridSizes(newGridSizeHeight, newGridSizeWidth);
597597
}

0 commit comments

Comments
 (0)