C++官网参考链接:https://cplusplus.com/reference/cmath/atan2/
函数
<cmath> <ctgmath>
atan2
C90
double atan2(double y, double x);
C99
double atan2 (double y, double x);
float atan2f (float y, float x);
long double atan2l (long double y, long double x);
C++98
double atan2 (double y, double x);
float atan2 (float y, float x);
long double atan2 (long double y, long double x);
C++11
double atan2 (double y, double x);
float atan2 (float y, float x);
long double atan2 (long double y, long double x);
double atan2 (Type1 y, Type2 x); // additional overloads
用两个形参计算反正切
返回以弧度表示y/x的反正切的值。
为了计算值,函数考虑了两个实参的符号,以确定象限。
在C++中&#

atan2函数用于计算二维坐标系中点(y, x)的反正切,返回值在[-π, π]弧度范围内。考虑了象限信息,当y和x均为0时会导致定义域错误。C++11提供了其他类型重载,并在<valarray>中有额外实现。"
133163966,20036736,AUTOSAR中PWM模块的配置与应用,"['嵌入式硬件', 'AutoSAR', '单片机', '汽车电子']
最低0.47元/天 解锁文章
558

被折叠的 条评论
为什么被折叠?



