dos_acos - dalefugier/DOSLib GitHub Wiki

Returns the angle whose cosine is the specified number.

Syntax

(dos_acos number)

Parameters

number

The number representing a cosine, where number must be greater than or equal to -1, but less than or equal to 1.

Returns

An angle, θ, measured in radians, such that 0 ≤ θ ≤ π, if successful.

nil on error.

Example

Command: (dos_acos 0.0)
1.5708

Command: (dos_acos 1.0)
0