<?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: Getting a Random Number Within a Range</title>
	<atom:link href="http://scriptnode.com/article/getting-a-random-number-within-a-range/feed/" rel="self" type="application/rss+xml" />
	<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/</link>
	<description>Tips and tricks for web developers.</description>
	<lastBuildDate>Tue, 17 Aug 2010 14:15:22 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Patrik</title>
		<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/comment-page-1/#comment-77</link>
		<dc:creator>Patrik</dc:creator>
		<pubDate>Wed, 23 Jul 2008 09:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=28#comment-77</guid>
		<description>Ok, I&#039;m really sorry for not knowing that. Then everything looks fine :) Thanks for your time!</description>
		<content:encoded><![CDATA[<p>Ok, I&#8217;m really sorry for not knowing that. Then everything looks fine :) Thanks for your time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hackett</title>
		<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/comment-page-1/#comment-75</link>
		<dc:creator>Matt Hackett</dc:creator>
		<pubDate>Wed, 23 Jul 2008 04:11:55 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=28#comment-75</guid>
		<description>Hi again Patrik,

I just looked into this and found that &lt;a href=&quot;http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Math:random&quot; rel=&quot;nofollow&quot;&gt;Math.random() should never return 1&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Hi again Patrik,</p>
<p>I just looked into this and found that <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Math:random" rel="nofollow">Math.random() should never return 1</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrik</title>
		<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/comment-page-1/#comment-72</link>
		<dc:creator>Patrik</dc:creator>
		<pubDate>Tue, 22 Jul 2008 19:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=28#comment-72</guid>
		<description>If I&#039;m not wrong, Math.random() can return 1 as a value. You would then get the equation 50 + (100 - 50 + 1) * 1 which will be 101. Or am I missing something here?</description>
		<content:encoded><![CDATA[<p>If I&#8217;m not wrong, Math.random() can return 1 as a value. You would then get the equation 50 + (100 &#8211; 50 + 1) * 1 which will be 101. Or am I missing something here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hackett</title>
		<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/comment-page-1/#comment-35</link>
		<dc:creator>Matt Hackett</dc:creator>
		<pubDate>Wed, 09 Jul 2008 18:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=28#comment-35</guid>
		<description>I don&#039;t think so, Patrik. I&#039;ve done extensive tests on this and haven&#039;t found a return value outside of the given integer range. Have you found a bad return?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think so, Patrik. I&#8217;ve done extensive tests on this and haven&#8217;t found a return value outside of the given integer range. Have you found a bad return?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrik</title>
		<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/comment-page-1/#comment-32</link>
		<dc:creator>Patrik</dc:creator>
		<pubDate>Wed, 09 Jul 2008 14:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=28#comment-32</guid>
		<description>Hmm, calling rand(50, 100) would give you a number between 50 and 101, I suppose &quot;+ 1&quot; should be removed?</description>
		<content:encoded><![CDATA[<p>Hmm, calling rand(50, 100) would give you a number between 50 and 101, I suppose &#8220;+ 1&#8243; should be removed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Hackett</title>
		<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/comment-page-1/#comment-26</link>
		<dc:creator>Matt Hackett</dc:creator>
		<pubDate>Wed, 09 Jul 2008 08:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=28#comment-26</guid>
		<description>Hm, good point. Removed!</description>
		<content:encoded><![CDATA[<p>Hm, good point. Removed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qing</title>
		<link>http://scriptnode.com/article/getting-a-random-number-within-a-range/comment-page-1/#comment-21</link>
		<dc:creator>qing</dc:creator>
		<pubDate>Wed, 09 Jul 2008 01:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=28#comment-21</guid>
		<description>why need (Math.random() % 1) ?</description>
		<content:encoded><![CDATA[<p>why need (Math.random() % 1) ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
