语法:
#include <cmath> double cos( double arg );
cos()函数返回arg的余弦,参数arg以弧度表示。cos()的返回值在[-1,1]范围内。如果arg是无穷大,cos()将会返回NAN并且发送(raise)一个浮点异常。
C++ 同样提供下列重载形式:
#include <cmath> float cos( float arg ); // same as cosf() in C99 long double cos( long double arg ); // same as cosl() in C99