Shiny Language Reference
Language Reference > Math Functions
cos
double cos(double Param);
Calculates cosine
Performs the trigonometric cosine operation on x returning a value between -1 and 1.
Parameters
Param
Angle expressed in radians (180 degrees = PI radians).
Return Value
Cosine of Param
Example Code
// Calculate cosine of 45 degrees. PI is defined internally by SSEdit
double Res = cos(45 * PI / 180);