> For the complete documentation index, see [llms.txt](https://docs.settlers-united.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.settlers-united.com/s4-lua-api-de/su-library-functions/su.math/su.math.acos.md).

# SU.Math.acos

## SU.Math.acos(value)

Gibt den Arkuskosinus (Umkehrfunktion von `cos` [SU.Math.cos](/s4-lua-api-de/su-library-functions/su.math/su.math.cos.md), entspricht `cos^-1`) **in Radiant** zurück ([SU.Math.rad](/s4-lua-api-de/su-library-functions/su.math/su.math.rad.md)).

{% hint style="info" %}
Winkelfunktionen arbeiten mit **Gleitkomma**zahlen, daher sollte das **End**resultat meist **gerundet werden**! **Zwischen**resultate können und sollen meist **so bleiben** wie sie sind. **Beispiel:**

```lua
local degrees = SU.Math.deg(3.14159)    -- liefert 179.9999...
local roundedDegrees = SU.Math.round(degrees)    -- liefert 180
```

{% endhint %}

#### Parameter

* `value`: `number` – Gleitkommazahl im Intervall \[-1, 1]

#### Rückgabewert

* `number` – Winkel im Intervall \[0, pi] (in **Radiant**)
* `nan` (not a number [SU.Math.isNan](/s4-lua-api-de/su-library-functions/su.math/su.math.isnan.md)): Fehler bei Eingaben außerhalb von \[-1, 1]

#### Beispiel

```lua
local acosValue = SU.Math.acos(-0.9)    -- liefert ca. 2.69 rad
```
