Re: Random Number
Re: Random Number
- Subject: Re: Random Number
- From: Shaun Chu <email@hidden>
- Date: Thu, 28 Feb 2002 15:27:11 -0800 (PST)
Thanks for the help,
I'm looking to get a random number when a button is
clicked so I'll probably need to base it on time. Any
ideas how I would go about implementing this?
Thanks
Shaun
--- Steven Rogers <email@hidden> wrote:
>
On Thursday, February 28, 2002, at 01:09 PM, Ondra
>
Cada wrote:
>
>
> Shaun,
>
>
>
>>>>>>> Shaun Chu (SC) wrote at Thu, 28 Feb 2002
>
13:27:37 -0500:
>
> SC> Sorry if this sounds like a dumb question, but
>
how do I get a truly
>
> SC> random number in Cocoa?
>
>
>
> Depends on what you call "truly". The standard way
>
is random (see man
>
> random), but I would not use it for a serious
>
statistics ;)
>
>
>
> If you need a good random stream, you have to go
>
outside of Cocoa to
>
> generic
>
> libraries, I fear.
>
>
Yes, it all depends on what you want. If you just
>
need one random
>
number, like "heads or tails" at the beginning of a
>
game, or if you're
>
getting the random number at times related to user
>
interaction, you can
>
usually base it on time. If you need a stream of
>
random numbers, you'll
>
need to do something else.
>
>
Steve
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be
ignored.
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.