create a clip method for range, and use that to implement constrain