title: Generating a Random Number with Precision in JavaScript
body: <p>I've got this function:</p>
  
  <pre><code>Number.random = function(minimum, maximum, precision) {
      minimum = minimum === undefined ? 0 : minimum;
      maximum = maximum === undefined ? 9007199254740992 : maximum;
      precision = precision === undefined ? 0 : precision;
  
      var random = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
  
      return random;
  }
  </code></pre>
  
  <p>Right now precision is not implemented, does anyone have any good ideas on how I can implement it? The purpose of the precision option is to give you a fixed number of multiple decimal places out, e.g.:</p>
  
  <pre><code>// A number from 0 to 10 that will always come back with two decimal places
  Number.random(0, 10, 2); // 3.14
  </code></pre>