Sharing web technology
April 28, 2009 § 3 Comments
int i = arc4random() % 100;
i will generate an integer between 0 and 100. % is reminder.
That’s an interesting article. I just wondered if you could tell me where to find more info on this topic ?
I have another post on how to seed the random generator using another random method.
> int i = arc4random() % 100;
> generate an integer between 0 and 100.
*BETWEEN* 0 and 100? (Meaning 1-99)
It will include 0… and it will include 99… and all the numbers in between.
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
You are commenting using your Google+ account. ( Log Out / Change )
Connecting to %s
Notify me of new comments via email.
« iphone App Strategy based on analytics
API Design Guidelines »
You are currently reading Objective-C Math Random Number at Web Builders.
Create a free website or blog at WordPress.com.