<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Radians to rotate_sprite</title>
		<link>http://www.allegro.cc/forums/view/573918</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 20 Mar 2006 15:11:58 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m so not in a programming state of mind, but I still want to get this done. How do I convert radians to respond correctly to allegro&#39;s rotate_sprite()?</p><p>I know that</p><pre>
Degrees     Radians     Fixed(?)
360°     =   PI*2    =    256
180°     =    PI     =    128
90°      =   PI/2    =    64
</pre><p>

I&#39;m not using degrees at all, so ignore that. I&#39;m just showing I understand <b>what</b> is going on, I just dont know how to convert radians to fixed (if that&#39;s what you call it.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ceagon Xylas)</author>
		<pubDate>Mon, 20 Mar 2006 15:03:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="source-code snippet"><div class="inner"><pre><span class="k1">float</span> allegro_degrees <span class="k3">=</span> radians<span class="k3">*</span><span class="n">128</span>.<span class="n">0</span><span class="k3">/</span>M_PI<span class="k2">;</span>
<span class="c">// or</span>
<a href="http://www.allegro.cc/manual/fixed" target="_blank"><span class="a">fixed</span></a> allegro_degrees <span class="k3">=</span> <a href="http://www.allegro.cc/manual/ftofix" target="_blank"><span class="a">ftofix</span></a><span class="k2">(</span>radians<span class="k3">*</span><span class="n">128</span>.<span class="n">0</span><span class="k3">/</span>M_PI<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Mon, 20 Mar 2006 15:07:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Woo! Thanks a ton!<br />[edit]<br />Hehe yeah, I figured that after the first example didn&#39;t work =]
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ceagon Xylas)</author>
		<pubDate>Mon, 20 Mar 2006 15:11:58 +0000</pubDate>
	</item>
</rss>
