• 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: Paul Suh <email@hidden>
  • Date: Thu, 5 Jul 2007 13:39:18 -0400

William,

A long time ago I wrote a thread-safe Obj-C wrapper for the random(3) syscall. It's BSD licensed, use it if you feel like it. I'd like to update it to use /dev/urandom as the seed source, rather than the system time, but you can do that on your own if you like. It's just a file and a header, so I didn't see any point in creating a framework around it.

<http://ps-enable.com/software/RandomSequence.tgz/view>


--Paul


Paul Suh http://www.ps-enable.com/
email@hidden (240) 672-4212




On Jul 4, 2007, at 10:43 AM, William Squires wrote:

What's the proper way to get a random number in ObjC/Cocoa? I need it in an NSNumber to put in an NSArray. Thanks.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Random numbers? (From: William Squires <email@hidden>)

  • Prev by Date: Re: Logging to text files
  • Next by Date: Zombies don't get enabled
  • Previous by thread: Re: Random numbers?
  • Next by thread: Re: Random numbers?
  • Index(es):
    • Date
    • Thread