to get back to my original question I'm not just doing this: int tmp = (arc4random()%10)+1;
while (tmp == activeTarget) { tmp = (arc4random()%10)+1; } activeTarget = tmp; On Tue, Apr 14, 2009 at 11:32 AM, Michael Ash <michael....@gmail.com> wrote: > On Tue, Apr 14, 2009 at 6:56 AM, Jean-Daniel Dupas > <devli...@shadowlab.org> wrote: > > reading /dev/random is currently the best way to generate random number > on > > OS X. > > > > http://lists.apple.com/archives/apple-cdsa/2009/Mar/msg00077.html > > Careful with these blanket pronouncements. The best way depends on > your goals, as is almost always the case in programming. For example, > /dev/random really stinks if you want a repeatable sequence, and is a > poor choice if you value speed over the quality of the random numbers. > > Mike > _______________________________________________ > > 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/edolecki%40gmail.com > > This email sent to edole...@gmail.com > -- http://ericd.net Interactive design and development _______________________________________________ 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