rescale function

Scale numbers into a new range