Re: Random Numbers
Re: Random Numbers
- Subject: Re: Random Numbers
- From: "Michael P. Rogers" <email@hidden>
- Date: Wed, 13 Jun 2001 22:26:24 -0500
I probably didn't look in the right place, but I can't find anything
in Cocoa for using random numbers.
I did a search through the Foundation API reference for random, but
didn't find anything useful -- NSRandomSpecifier and NSSet apparently
use a random number generator, but don't provide any publicly
accessible methods. This is not a definitive answer, but certainly
suggestive.
Anyway, all you need to do is call rand() to generate random uniform
numbers -- you don't even need to add any headers -- so a class just
to wrap around this call would be overkill. Now as for gaussian and
other random numbers, well, that would be nice, but perhaps too
specialized.
Michael
--
---------------------------------
Dr. Michael Rogers
e-mail: email@hidden
Phone: 217-424-6327
For information about Computer Science at Millikin University, visit
http://math.millikin.edu
For information about astronomy, check out
http://twincityamateurastronomers.org