×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2014.2381 | Released: 30 Jul 2014, 6:32am | What's New | Download Now

math.acos()

Description:

Returns the arc cosine of a value in radians.

Syntax:

math.acos (x)

Example:

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 

Parameters:

x
A number.

Returns:

A number in the range 0 to pi. If the parameter x is outside the range [-1..1], the result will be nan.

Remarks:
Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Corona SDK 1.0
  • Windows:
    Corona SDK 2.0
  • iOS:
    Corona SDK 1.0
  • Android:
    Corona SDK 2.0