On 15-Apr-2009, at 18:46, Michael Ash wrote, quoting Eric E. Dolecki:

int result = (arc4random()%9) + 1;
if (result >= activeTarget) ++result;
activeTarget = result;

No it won't.

Sorry, you're right; I was wrong. I wrote after a too brief analysis of the code. It's actually a rather algorithm. I apologize for the noise. The punishment for my error is that it will be indexed by Google for what passes on the Internet as eternity.

My other points about Mersenne Twister burstiness, etc. stand.

-- Peter
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to