title: Turn a negative number into a positive for probability
body: <p>I want to create an array that sends a pixel in a specific direction.</p>
  
  <p>It has four options: Forward, Backward, Left, Right</p>
  
  <p>Each direction has an associated score that is its probability of sending the pixel in a specific direction.</p>
  
  <p>Example:</p>
  
  <pre><code>Direction[Forward] = 20;
  Direction[Backward] = 12;
  Direction[Left] = -5;
  Direction[Right] = 2;
  </code></pre>
  
  <p>How can I make the number for each key in the direction array equal the probability of moving the pixel? I want the negative number to play into the probability albeit a small chance. </p>
  
  <p>Currently I copy each direction key into a new array the number of times as it's probability score, then generate a random number against the new array, but that doesn't work on negative numbers, so I change them to +1 in advance. Obviously this doesn't scale on negative numbers. </p>
  
  <p>How can I create a probability for each array key regardless if it's a positive or negative number?</p>