Skip to content

Commit

Permalink
fix grid size calculation formula (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
leumasme authored Sep 30, 2024
1 parent ea731c8 commit ee1aa66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/journeymap/client/render/map/GridRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ private void updateBounds(int width, int height)
}

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

setGridSizes(newGridSizeHeight, newGridSizeWidth);
}
Expand Down

0 comments on commit ee1aa66

Please sign in to comment.