initial commit
This commit is contained in:
5
helper-methods.js
Normal file
5
helper-methods.js
Normal file
@@ -0,0 +1,5 @@
|
||||
function calculateTileSize(width, height, tilesX, tilesY) {
|
||||
const tileWidth = width / tilesX,
|
||||
tileHeight = height / tilesY;
|
||||
return Math.floor(Math.min(tileWidth, tileHeight));
|
||||
}
|
Reference in New Issue
Block a user