For uniform grids, this is simply { x: grid.cols - 1, y: grid.rows - 1 }.
For jagged grids, consider all the rows with the max cols.
In the below case, row indexes 1 and 2 have the max cols of 3,
and we take the last of those rows. Thus the last cell is { x: 2, y: 2 } (position 7)
Returns the last cell of a grid, column-wise
For uniform grids, this is simply
{ x: grid.cols - 1, y: grid.rows - 1 }.For jagged grids, consider all the rows with the max cols. In the below case, row indexes 1 and 2 have the max cols of 3, and we take the last of those rows. Thus the last cell is { x: 2, y: 2 } (position 7)
See also firstCellColumnwise