Yeah looks like a bug.  Instead of fixed(0), maybe just convert to int

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of mitchgrrt
Sent: Thursday, November 12, 2009 1:14 PM
To: [email protected]
Subject: [flexcoders] Re: toFixed(0) problem?



Whoops, I mean the strings come out as

0.
1
2

The first has the decimal, the other two don't.

--- In [email protected]<mailto:flexcoders%40yahoogroups.com>, 
"mitchgrrt" <mitch_g...@...> wrote:
>
> If we do this:
>
> var n0:Number = 0.0; var s0:String = n0.toFixed(0);
> var n1:Number = 1.0; var s1:String = n1.toFixed(0);
> var n2:Number = 2.0; var s2:String = n2.toFixed(0);
>
> The first string comes out as "0." (with decimal) and the other two come out 
> as "0" (no decimal). Seems like a bug, no?
>

Reply via email to