Returns the closest point in the interval to the given point "p". The interval must be
See Implementation
Returns the closest point in the interval to the given point "p". The interval must be