PDA

View Full Version : rounding to 2 decimal places (dollars and cents)


mperrah
09-09-2001, 07:25 PM
I am building a shopping cart http://www.mperrah.com/tulip/archive/index.html
(Click the images to get to the cart.)
I multiply the sales tax and get 3 or more decimals places for the result.
Is there a way to round up to 2 decimals
ie ($123.46)
not ($123.456...)
I can send the .fla file to anyone interested

Jesse
09-10-2001, 06:27 AM
http://www.actionscripts.org/forums/search.php3?query=round+decimal+number&forumchoice=-1&booleanand=yes&searchin=all&searchdate=-1&searchuser=&searchdateline=&exactname=yes&action=dosearch&getdaily=&pagenum=

search = good

ushka
04-24-2008, 06:07 PM
Math.round(number*100)/100
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15542