Node.js examples for Math:Round
Round to specified number of places
Number.prototype.round = function(places) { if(!places) return Math.round(this); var tmp = Math.pow(10,places); return Math.round(this * tmp) / tmp; };