Scales a value within a range