Type Function Library math.* Return value Number Revision 2017.3060 Keywords acos, arc cosine See also math.cos()
Returns the arc cosine of x
in radians. The result will be in the range 0
to pi
. If the parameter x
is outside the range [-1..1]
, the result will be NaN
.
local x = math.acos(1) -- result will be 0 local y = math.acos(-1) -- result will be 3.14159... local z = math.acos(1.1) -- result will be NaN