In the exception that Math.random() returns 1, in which case you would get 2.
I don't use Math.random(), though, I use the Parker-Miller PRNG. On 5/9/2010 5:01 PM, Juan Pablo Califano wrote:
PS 2: I think the correct way to write the function that returns a number in the range -1 / 1 is: Math.floor(Math.random * 3) - 1 In this case, you could indeed use int() instead of a static Math method, so I guess I was wrong about your function needing a Math.round call.
_______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders