The math.acos()
function returns the trigonometric inverse cosine(arc cosine) of a number.
math.acos(x)
Where x
is the number for which you want to find the inverse cosine.
The function calculates the angle (in radians) whose cosine is equal to x.
In the above case, the inverse cosine of 0.5 is approximately 1.0471975511965979
radians.
We can use the math.degrees function to turn the radians into degrees.