title: Algorithm to map an interval to a smaller interval
body: <p>I tried searching, but due to the nature of my question, I was unable to find something satisfactory.</p>
  
  <p>My problem is the following: I am trying to map numbers ranging from 0 to 2000 (though ideally the upper limit would be adjustable) to the much smaller interval ranging from 10 to 100. The upper limits would map (2000->100) and the lower limits as well. Other than that, an entry that is bigger than another entry in the interval [0;2000] would ideally be bigger than that mapped entry in [0;100]</p>
  
  <p>I'm thinking that this question is not language specific, but in case you are wondering, I'm working with Javascript today.</p>