chickadee » hypergiant » clamp

clamp X LOWER UPPERprocedure

Given the number X, return a value that is the same, so long as it is not greater than UPPER or less than LOWER: in these cases, return the upper or lower bound, respectively.