made rescale function

Scales a set of numbers to a differnt range based on their range