k, thanks all. i went for the boundary check. the other one was ""+i == "0.8" which was even dirtier ;)
At 12:33 PM 12/7/2005, Danny Kodicek wrote:
<quote that refuses to indent, curses> ----- Original Message ----- From: "Toon Van de Putte" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" <[email protected]> Sent: Monday, December 05, 2005 10:10 PM Subject: Re: [Flashcoders] floating point var i = 0; var j= 0.8; j*=10 onEnterFrame = function () { i = i + 1; trace (i); if (i == j) trace("here"); } Or is that just not possible (ie you don't know how many decimal spaces j will have)? </quote> The other way is something like if (Math.abs(i-j)<0.001) {} Danny _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

