My problem is that i am retrieving the mouses coordinates when the user of my program clicks the screen and i want to be able to round these coordinates to the nearest coordinate in an already defined list of coordinates(in this case its a list of all the centre points of a grid of shapes)

The grid of shapes is a grid of hexagons, the centre points of which are 30 pixels away from each other in the x axis and 30 in the y axis.

How would i round my mouses coordinates to the nearest centre point of the hexagons?
Thanks