Current location - Training Enrollment Network - Mathematics courses - Call of sin function and cos function in c language
Call of sin function and cos function in c language
Sin function and cos function in C language are functions in C standard mathematical function library, and math.h header file needs to be introduced for calling.

First, sin ()? Function description:

C library function double sin(double x) returns the sine value of radian angle X. The declaration of sin () function: double sin(double x).

Parameter: x floating-point value, indicating the angle in radians.

Return value: this function returns the sine value of X.

Second, the cos () function description:

The function of cos () is to find the cosine of an angle. cos()? Function declaration: double cos (double x).

Parameter: x floating-point value, indicating the angle in radians.

Return value: this function returns the cosine of x.

Extended data:

Correlation trigonometric function:

double asin(double); The result is between [-PI/2, PI/2]

Double acos (double); The result is between [0, PI]

Double (double); Arctangent (principal value), the result is between [-PI/2, PI/2]

double atan2 (double,double); Arctangent (integer value), the result is between [-PI, PI]

Baidu encyclopedia -math.h