<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[观夏Note]]></title> 
<link>//gm.angeldm.com/index.php</link> 
<description><![CDATA[新技术番]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[观夏Note]]></copyright>
<item>
<link>//gm.angeldm.com/post//</link>
<title><![CDATA[C++中cos，sin，tan等三角函数角度转弧度]]></title> 
<author>果面 &lt;admin@yourname.com&gt;</author>
<category><![CDATA[程序开发]]></category>
<pubDate>Fri, 02 Dec 2011 02:31:21 +0000</pubDate> 
<guid>//gm.angeldm.com/post//</guid> 
<description>
<![CDATA[ 
	C++中cos,sin,asin,acos这些三角函数操作的是弧度,而非角度,<br/>你需要把角度转化为弧度.<br/><br/>弧度=角度*Pi/180;<br/><br/>例子1：<br/>比如对边和邻边分别为a,b<br/>设角度为x，则<br/>x=atan(a/b);<br/>其中x为弧度制<br/>如需转换为角度值，则x*180/3.1415<br/><br/><br/>例子2：<br/><div class="code"><br/>//计算旋转角度&nbsp;&nbsp; &#123;弧度=角度*Pi/180&#125; &#123;两点间距离公式 根号下（&#124;X1-X2&#124;的平方+&#124;Y1-Y2&#124;的平方）&#125;<br/>&nbsp;&nbsp; double angle_tanValue=sqrt(pow(point.x-point.x,2)+pow(point.y-Right_Top_Point.y,2))/<br/>&nbsp;&nbsp;&nbsp;&nbsp;sqrt(pow(Turn_Point_L&#91;1&#93;.x-point.x,2)+pow(Turn_Point_L&#91;1&#93;.y-Right_Top_Point.y,2));<br/>&nbsp;&nbsp; //求出tan 与 sin 的弧度<br/>&nbsp;&nbsp; double angle_atanValue=atan(angle_tanValue);<br/>&nbsp;&nbsp; double angle_sinValue=sin(angle_atanValue);<br/>&nbsp;&nbsp; //弧度转换成角度<br/>&nbsp;&nbsp; double angle=angle_atanValue*180/3.1415;<br/>&nbsp;&nbsp; //取绝对值<br/>&nbsp;&nbsp; angle=fabs(angle);<br/></div>
]]>
</description>
</item><item>
<link>//gm.angeldm.com/read.php?&amp;guid=0#topreply</link>
<title><![CDATA[[评论] C++中cos，sin，tan等三角函数角度转弧度]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>//gm.angeldm.com/read.php?&amp;guid=0#topreply</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>