alert(Round(3*19.95, 2));
function Round(value, decimals) {
return (Math.round(value * Math.pow(10, decimals)) / Math.pow(10, decimals));
}
I hate dealing with floating points in jscript. If I recall correctly I used this function to get the value I actually wanted:
Code:alert(Round(3*19.95, 2)); function Round(value, decimals) { return (Math.round(value * Math.pow(10, decimals)) / Math.pow(10, decimals)); }
