Geeks ;)
2005/12/9, Mark Winterhalder [EMAIL PROTECTED]:
OK, I ran some tests of my own. After repeating it a couple of times,
with various outcomes, the trend seems to be that a) the cast is about
10% faster than the equality, and b) the bitwise and is about 10%
faster than the modulo.
I
Is it possible to check a number to see if its even / odd?
Thanks!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
:[EMAIL PROTECTED] On Behalf Of Mike
Boutin
Sent: Thursday, December 08, 2005 4:40 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Even odds
Is it possible to check a number to see if its even / odd?
Thanks!
___
Flashcoders mailing list
Flashcoders
var isOdd:Boolean = number % 2 == 1;
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Boutin
Sent: December 8, 2005 7:40 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Even odds
Is it possible to check a number to see if its even / odd
Yet another way (and probably the fastest):
var isOdd:Boolean = Boolean(num 1);
- boon
Mike Boutin [EMAIL PROTECTED] wrote: Is it possible to check a number to see
if its even / odd?
Thanks!
___
Flashcoders mailing list
is an improvement.
Scott
-Original Message-
From: [EMAIL PROTECTED] on behalf of Boon Chew
Sent: Thu 12/8/2005 9:34 PM
To: Flashcoders mailing list
Cc:
Subject:Re: [Flashcoders] Even odds
Yet another way (and probably the fastest):
var isOdd:Boolean = Boolean(num 1
: [Flashcoders] Even odds
Yet another way (and probably the fastest):
var isOdd:Boolean = Boolean(num 1);
- boon
Mike Boutin [EMAIL PROTECTED] wrote: Is it possible to check a number to
see if its even / odd?
Thanks!
___
Flashcoders
7 matches
Mail list logo