uTools-Manuals/docs/c/atan2.html
2019-04-08 23:22:26 +08:00

36 lines
833 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>数学函数 - atan2</h1>
<p>原型extern float atan2(float y, float x);</p>
<p>用法:#include &lt;math.h></p>
<p>功能求y/x弧度表示的反正切值</p>
<p>说明:值域为(-π/2+π/2)。</p>
举例:<pre>
// atan2.c
#include &lt;syslib.h>
#include &lt;math.h>
main()
{
float x,y;
clrscr(); // clear screen
textmode(0x00); // 6 lines per LCD screen
x=0.064;
y=0.2;
printf("atan2(%.3f,%.2f)=%.4f",y,x,atan2(y,x));
getchar();
return 0;
}
</pre>相关函数:<a href="asin.html">asin</a>,<a href="acos.html">acos</a>,<a href="atan.html">atan</a>,<a href="sin.html">sin</a>,<a href="cos.html">cos</a>,<a href="tan.html">tan</a>