function roundTo(decimalpositions) { var i = this * Math.pow(10,decimalpositions); i = Math.round(i); return i / Math.pow(10,decimalpositions); } Number.prototype.roundTo = roundTo;
RSS