Consider a grid of m
by n
squares of side length side
with lower left corner at the origin (0,0). The columns are numbered from zero, with the zero column at left. The rows are numbered from zero, with the zero row at bottom. If the point (x,y) is in one of the grid squares, set value
to be an object with properties row
and column
whose values are the row and column of the containing square. If the point (x,y) is not in any grid square, let row and column be null in the returned object.