This is some good code to round a decimal number to however many places you need using javascript:
// Round a number (num) to however many decimal places (dec)
function roundNumber(num, dec) {
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}
1 comment:
Dude, email me at my gmail account because I have no idea what your email address is. It's too f-ing long!
Post a Comment