Built-in functions: math_acos()

The function math_acos() is a complementary function of math_cos().

Declaration

float math_acos( float aValue )

Parameters

aValue

The value representing a cosine. Valid values lie in the range -1.0 .. +1.0.

Discussion

The inverse trigonometric function math_acos() calculates the arccosine of the given value aValue. The function returns an angle value expressed in degree lying in the range +180.0 .. 0.0. For example:

var float angle = math_acos( 0.5 ); // angle = 60.0

Passing a value less than -1.0 or greater than +1.0 causes the function to return a non-a-number value.