# DeltaAngle(float, float)

> Calculates the shortest difference between two angles.

## Definition

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

```csharp
public static float DeltaAngle(float current, float target)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The current angle in degrees.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The target angle in degrees.

### Returns

| Type                                                          | Description                                                     |
| ------------------------------------------------------------- | --------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | A value between -180 (exclusive) and 180 (inclusive) in degrees |

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        // Prints 90
        Debug.Log(Mathf.DeltaAngle(1080, 90));
    }
}
```
