Returns a visual rectangle of the cell, positioned from the top-left corner
const cell = { x: 1, y: 0 };// 5x5 grid, each cell 5px in sizeconst grid = { rows: 5, cols: 5, size: 5 }const r = rectangleForCell(grid, cell,);// Yields: { x: 5, y: 0, width: 5, height: 5 } Copy
const cell = { x: 1, y: 0 };// 5x5 grid, each cell 5px in sizeconst grid = { rows: 5, cols: 5, size: 5 }const r = rectangleForCell(grid, cell,);// Yields: { x: 5, y: 0, width: 5, height: 5 }
Returns a visual rectangle of the cell, positioned from the top-left corner