Re: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread Yehia Shouman
] > > [mailto:[EMAIL PROTECTED] On Behalf Of T. > > Michael Keesey > > Sent: Wednesday, December 06, 2006 3:23 PM > > To: Flashcoders mailing list > > Subject: Re: [Flashcoders] Compare Decimal Point Value? > > > > In Flash 9, I get this for the traces: > >

Re: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread Yehia Shouman
om: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of T. > Michael Keesey > Sent: Wednesday, December 06, 2006 3:23 PM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Compare Decimal Point Value? > > In Flash 9, I get this for the traces: > 2.3 > 0.29

Re: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread T. Michael Keesey
ct: Re: [Flashcoders] Compare Decimal Point Value? In Flash 9, I get this for the traces: 2.3 0.2998 0.3 false false true Good old-fashioned floating point precision error. Instead of testing if they are equal, You could test if the difference between them is very small, e.g.: trace(Ma

RE: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread Doug Coning
ist Subject: RE: [Flashcoders] Compare Decimal Point Value? Math.round(myNum * 10); :) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Doug Coning > Sent: Wednesday, December 06, 2006 12:32 PM > To: Flashcoders mailing list >

RE: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread Steven Sacks | BLITZ
Math.round(myNum * 10); :) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Doug Coning > Sent: Wednesday, December 06, 2006 12:32 PM > To: Flashcoders mailing list > Subject: RE: [Flashcoders] Compare Decimal Point V

RE: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread Steven Sacks | BLITZ
Have you tried casting them as Strings and comparing those? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of T. Michael Keesey > Sent: Wednesday, December 06, 2006 12:23 PM > To: Flashcoders mailing list > Subject: Re:

RE: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread Doug Coning
Of T. Michael Keesey Sent: Wednesday, December 06, 2006 3:23 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Compare Decimal Point Value? In Flash 9, I get this for the traces: 2.3 0.2998 0.3 false false true Good old-fashioned floating point precision error. Instead of

Re: [Flashcoders] Compare Decimal Point Value?

2006-12-06 Thread T. Michael Keesey
In Flash 9, I get this for the traces: 2.3 0.2998 0.3 false false true Good old-fashioned floating point precision error. Instead of testing if they are equal, You could test if the difference between them is very small, e.g.: trace(Math.abs(num2 - num3) < 0.1); // true On 12/6/