Function
A new point; neither argument is modified.
Find the point of an axis-aligned rectangle nearest to a given point. A point already inside the rectangle is returned unchanged, so the result is the point itself rather than a point on the border — use closestPointOnEdge when you always want a point on the outline.
closestPointOnAabb