# Acos(float)

> Returns the arc-cosine of f - the angle in radians whose cosine is f.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static float Acos(float f)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Value to compute the arc-cosine for, in the range \[-1,1].

### Returns

| Type                                                          | Description                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | Angle in radians whose cosine equals `f`, in the range \[0, Pi]. |

### Remarks

For values of `f` outside of the \[-1,1] range, this function will return NaN.

Additional Resources: [Mathf.Cos](/engine/6000.6/script-reference/unityengine/mathf/cos.md).

### Examples

```csharp
using UnityEngine;

public class ScriptExample : MonoBehaviour
{
    void Start()
    {
        // Prints NaN
        Debug.Log(Mathf.Acos(-1.0000001f));
        // Prints 3.141593
        Debug.Log(Mathf.Acos(-1));
        // Prints 1.570796
        Debug.Log(Mathf.Acos(0));
        // Prints 0
        Debug.Log(Mathf.Acos(1));
        // Prints NaN
        Debug.Log(Mathf.Acos(1.0000001f));
    }
}
```
