ico.js
function(num, dec) {
      var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
      return result;
    }
function(num, dec) {
      var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
      return result;
    }
function ( num , dec ) { var result = Math . round ( num * Math . pow ( 10 , dec ) ) / Math . pow ( 10 , dec ) ; return result ; }
Rounds a float to the specified number of decimal places.

@param {Float} num A number to round
@param {Integer} dec The number of decimal places
@returns {Float} The rounded result
Rounds a float to the specified number of decimal places .