I have a method that receives two range endpoints - start of range and end of range and an integer.
It checks to see if the integer falls between the two end points and returns either the integer or the corresponding end point if the integer falls outside the boundary.
Example 1:
- RangeStart = 0; RangeEnd = 10; Value = 5; Returns 5
Example 2:
- RangeStart = 0; RangeEnd = 10; Value = -4; Returns 0
Example 3:
- RangeStart = 0; RangeEnd = 10; Value = 23; Returns 10
Question: What should I call a method that does that? I had called it IntWithinRange, but I don't think I like that.
Any ideas?