三角函数:(所有参数必须为弧度)
1.acos
函数申明:acos (double x);
用途:用来返回给定的 X 的反余弦函数。
2.asin
函数申明:asin (double x);
用途:用来返回给定的 X 的反正弦函数。
3.atan
函数申明:atan (double x);
用途:用来返回给定的 X 的反正切函数。
4.sin
函数声明:sin (double x);
用途:用来返回给定的 X 的正弦值。
5.cos
函数声明:cos (double x);
用途:用来返回给定的 X 的余弦值。
6.tan
函数声明:tan (double x);
用途:用来返回给定的 X 的正切值。
7.atan2
函数声明:atan2 (double y, double x);
用途:返回给定的 X 及 Y 坐标值的反正切值
其他函数:
8.atof
函数名: atof (const char *s);
功 能: 把字符串转换成浮点数
用 法: double atof(const char *nptr);
程序例:
#i nclude <stdlib.h>
#i nclude <stdio.h>
int main(void)
{
float arg,*point=&arg;
float f;
char *str = "12345.67";
f = atof(str);
printf("string = %s float = %f\n", str, f);
return 0;
}