title: Is it ok to overwrite the default Math.round javascript functionality?
body: <p>I have no need to use the Math.round functionality if it does not allow me to choose how many decimal places I want. So I have created the following function that I use instead.</p>
  
  <pre><code>Number.prototype.round = function(precision) {
      var numPrecision = (!precision) ? 0 : parseInt(precision, 10);
      var roundedNum = Math.round(this * Math.pow(10, numPrecision)) / Math.pow(10, numPrecision);
      return roundedNum;
  };
  </code></pre>
  
  <p>My question is, can I change it to the following instead without any repercussions.</p>
  
  <pre><code>Math.roundP = function(num, precision){
     var pow = Math.pow(10, precision||0);
     return (Math.round(num*pow) / pow);
  };
  </code></pre>
  
  <p>I realize that this will overwrite the default Math.round functionality, but I have no need for it. Is this okay in Javascript? I have not done this before so I just wanted to see what peoples thoughts on this is. Or maybe its better for me to leave it the way it is.</p>
  
  <p>I am having trouble deciding when to use Number.prototype, and when to use Math.</p>