and this Math.round(number * 100) / 100;
? []'s andrei On 9/14/07, Paul Steven <[EMAIL PROTECTED]> wrote: > > I would be interested to know how people format numbers in AS3 to 2 > decimal > places. > > I am currently using the following but it does not always appear to work: > > var displayPercentageValue:Number = Math.round(percentageValue / .01) * > .01; > > Sometimes it seems to be displaying correctly, sometimes it doesn't > > For example the following doesn't work: > > var displayPercentageValue:Number = Math.round(0.4123263888888889 / .01) * > .01; > > Whereas the following does work > > var displayPercentageValue:Number = Math.round(1.4123263888888889 / .01) * > .01; > > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

