 | µVision User's Guide legacy |  |
|
|
| __cos| Summary |
double __cos (
double x); /* value to calculate cosine for */
| | Description | The __cos debugger function calculates the trigonometric cosine of the floating-point value x. | | Return Value | The __cos function returns the cosine of x. | | See Also | __sin, __tan | | Example |
FUNC float cosine_wave (float f) {
float pi = 3.14159265;
return __cos (f * (((float) STATES) / CLOCK) * 2 * pi);
}
|
|
|