export default (columns, offset_x, offset_y, width, height) => {
    let _i = 0
    return (i = _i) => {
        const c = i % columns
        const r = ~~(i / columns)
        _i = i + 1

        const x = offset_x + c * width
        const y = offset_y + r * height
        return { x, y }
    }
}

/*
const grid = createGrid(1, 10, 10, 100, 10)
const {x, y} = grid()
*/
