title: normalizing a list of doubles to range -1 to 1 or 0 - 255
body: <p>I have a list of doubles in the range of anywhere between <code>-1.396655</code> to <code>1.74707</code> could even be higher or lower, either way I would know what the <code>Min</code> and <code>Max</code> value is before normalizing. My question is How can I normalize these values between <code>-1</code> to <code>1</code> or even better yet convert them from double values to char values of <code>0</code> to <code>255</code></p>
  
  <p>Any help would be appreciated.</p>
  
  <pre><code>double range = (double)(max - min);
  value = 255 * (value - min)/range
  </code></pre>