code: function(num, dec) {
        var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
        return result;
      }
docs: 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