function roundTo(num, prec) {
    var n = Math.pow(10, prec);
    var sat = Math.round(num * n) / n;
    sat = sat.toFixed(8);
    return sat;
}
// Round to a specific number of decimal points
Round to a specific number of decimal points
Round to a specific number of decimal points
function roundTo(num, prec) {
    var n = Math.pow(10, prec);
    var sat = Math.round(num * n) / n;
    sat = sat.toFixed(8);
    return sat;
}
function roundTo ( num , prec ) { var n = Math . pow ( 10 , prec ) ; var sat = Math . round ( num * n ) / n ; sat = sat . toFixed ( 8 ) ; return sat ; }
Round to a specific number of decimal points
Round to a specific number of decimal points