Returns the closest point on a rectangle to a given point
The top-right, top-left, bottom-left, bottom-right points (in that order) of the rectangle
the point
The closest point on the rectangle
Returns the closest point on a rectangle to a given point