# Atan(float)

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

## Definition

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

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

### Parameters

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

### Returns

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

### Remarks

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

Additional Resources: [Mathf.Tan](/engine/6000.7/script-reference/unityengine/mathf/tan.md), [Mathf.Atan2](/engine/6000.7/script-reference/unityengine/mathf/atan2.md).

### Examples

```csharp
using UnityEngine;

public class ScriptExample : MonoBehaviour
{
    void Start()
    {
        // Prints -1.570796
        Debug.Log(Mathf.Atan(-Mathf.Infinity));
        // Prints -0.7853982
        Debug.Log(Mathf.Atan(-1));
        // Prints 0
        Debug.Log(Mathf.Atan(0));
        // Prints 0.7853982
        Debug.Log(Mathf.Atan(1));
        // Prints 1.570796
        Debug.Log(Mathf.Atan(Mathf.Infinity));
    }
}
```
