fitInInterval function

Fit value(s) in interval