title: How to get a percentage from a range
body: <p>I have a basic math question. I am trying to get a percentage from a range of numbers and the algorithm is troubling me. </p>
  
  <p>Say I have a range of <code>-5</code> to <code>+5</code> and I want to know what percentage is in between given a value. I know that <code>-5</code> would be equivalent to <code>0%</code> and <code>5</code> would be <code>100%</code>, with <code>0</code> being <code>50%</code>.</p>
  
  <p>I tried to add 5 to bring up the scale, but it just feels like a hack. I would like it to feel dynamic so that I can give it any range and successfully work.</p>
  
  <p>Ex. </p>
  
  <pre><code>percent = (5 + value) * 100 / 10
  </code></pre>
  
  <p>How do I figure out what <code>value</code> should be the a general case? </p>