Re: Random numbers?
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