<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Generating random numbers in Cocoa</title>
	<atom:link href="http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/</link>
	<description>iPhone and Mac OS X Programming (with a bit of Ruby on Rails)</description>
	<pubDate>Thu, 29 Jul 2010 17:02:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Steve</title>
		<link>http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/comment-page-1/#comment-67325</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 24 Jul 2008 21:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/#comment-67325</guid>
		<description>Using MOD won't produce proper random numbers. You should scale the number to the range you need instead.

Imagine you could produce random numbers in the range of 0 to 3. And you wanted them in the range of 0 to 2, so you do a mod 3, and if an random number was = 3, then it would become 0, so you would get twice as many 0's as 1 or 2.</description>
		<content:encoded><![CDATA[<p>Using MOD won&#8217;t produce proper random numbers. You should scale the number to the range you need instead.</p>
<p>Imagine you could produce random numbers in the range of 0 to 3. And you wanted them in the range of 0 to 2, so you do a mod 3, and if an random number was = 3, then it would become 0, so you would get twice as many 0&#8217;s as 1 or 2.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
