<?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: How to Limit a Number Between 2 Values</title>
	<atom:link href="http://www.pixelwit.com/blog/2007/05/how-to-limit-a-number-between-2-values/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixelwit.com/blog/2007/05/how-to-limit-a-number-between-2-values/</link>
	<description>Making Flash Go</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:38:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Ralph</title>
		<link>http://www.pixelwit.com/blog/2007/05/how-to-limit-a-number-between-2-values/comment-page-1/#comment-2187</link>
		<dc:creator>Ralph</dc:creator>
		<pubDate>Sun, 09 Sep 2007 03:35:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.pixelwit.com/blog/2007/05/31/how-to-limit-a-number-between-2-values/#comment-2187</guid>
		<description>Here is a shortcut for what I call normalizing a value.  Say you have a loop that increments a counter variable and you only want the counter value to loop back around similar to your hi/low example.  A neat trick is to use the modulus operator so if you want to use just degrees for a circle for example you would just do:  (ctr % 360) + 1

Or if you only want 1 - 100 to show just do (ctr % 100) + 1 and this will guarantee that you only have to deal with numbers 1 through 100.</description>
		<content:encoded><![CDATA[<p>Here is a shortcut for what I call normalizing a value.  Say you have a loop that increments a counter variable and you only want the counter value to loop back around similar to your hi/low example.  A neat trick is to use the modulus operator so if you want to use just degrees for a circle for example you would just do:  (ctr % 360) + 1</p>
<p>Or if you only want 1 &#8211; 100 to show just do (ctr % 100) + 1 and this will guarantee that you only have to deal with numbers 1 through 100.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

