function roundFixed(num, fixed) { var pos = num.toString().indexOf('.'), decimal_places = num.toString().length - pos - 1, _int = num * Math.pow(10, decimal_places), divisor_1 = Math.pow(10, decimal_places - fixed), divisor_2 = Math.pow(10, fixed); r…