Shiny Language Reference

Language Reference > Math Functions


acos

double acos(double Param);

 

Calculates arccosine

Performs the trigonometric arc cosine operation on x and returns an angle in the range from 0 to PI expressed in radians.

 

Parameters

Param

Value between -1 and 1 whose arc cosine has to be calculated.

 

Return Value

Arccosine of Param

 

Example Code

// Calculate arccosine. PI is defined internally by SSEdit
double Res = acos(0.5) * 180 / PI;