title: Linear mapping interval of numbers to [0,1]
body: <p>I know it should be trivial, but tonight I'm not finding a solution.
  Suppose I have a series of float in a given range such [0.25, 1.0]. For example:</p>
  
  <pre><code>{0.25, 0.625, 1.0}
  </code></pre>
  
  <p>What's the correct way to transform them in order to map the [0.25,1.0] interval to [0.0,1.0]?
  The example sequence should become:</p>
  
  <pre><code>{0.0, 0.5, 1.0}
  </code></pre>
  
  <p>Second question, how to generalize that? How is the correct way to map a given interval [a,b] to [0,1]?</p>