• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Random Numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Random Numbers
      • From: Greg Titus <email@hidden>
References: 
 >Random Numbers (From: email@hidden)

  • Prev by Date: automan - man (help) page generator
  • Next by Date: Re: Setting the focus into an NSTableView?
  • Previous by thread: Re: Random Numbers
  • Next by thread: Re: Random Numbers
  • Index(es):
    • Date
    • Thread