---
title: deltaangle
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/mathematics/math/deltaangle
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/mathematics/math/deltaangle.md
last_updated: 2026-11-20
generated_at: 2026-11-25T22:12:26.273Z
locale: en-us
---

# deltaangle

> Returns the smallest signed angle in radians that rotates from one angle to another.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Mathematics](/engine/7000.0/script-reference/unity/mathematics.md)
* **Assembly:** UnityEngine.MathematicsModule

## deltaangle(float, float)

Returns the smallest signed angle in radians that rotates from one angle to another.

```csharp
public static float deltaangle(float from, float to)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The start angle in radians.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The end angle in radians.

### Returns

| Type                                                          | Description                                                          |
| ------------------------------------------------------------- | -------------------------------------------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The signed difference between the two angles in the range -PI to PI. |

### Remarks

The result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is congruent to to modulo 2 \* PI.

## deltaangle(float2, float2)

Returns the componentwise smallest signed angles in radians that rotate from one float2 vector of angles to another.

```csharp
public static float2 deltaangle(float2 from, float2 to)
```

### Parameters

**** (\[float2]\(/engine/7000.0/script-reference/unity/mathematics/float2)): The start angles in radians.**** (\[float2]\(/engine/7000.0/script-reference/unity/mathematics/float2)): The end angles in radians.

### Returns

| Type                                                                  | Description                                                                     |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [float2](/engine/7000.0/script-reference/unity/mathematics/float2.md) | The componentwise signed differences between the angles in the range -PI to PI. |

### Remarks

Each component of the result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is componentwise congruent to to modulo 2 \* PI.

## deltaangle(float3, float3)

Returns the componentwise smallest signed angles in radians that rotate from one float3 vector of angles to another.

```csharp
public static float3 deltaangle(float3 from, float3 to)
```

### Parameters

**** (\[float3]\(/engine/7000.0/script-reference/unity/mathematics/float3)): The start angles in radians.**** (\[float3]\(/engine/7000.0/script-reference/unity/mathematics/float3)): The end angles in radians.

### Returns

| Type                                                                  | Description                                                                     |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [float3](/engine/7000.0/script-reference/unity/mathematics/float3.md) | The componentwise signed differences between the angles in the range -PI to PI. |

### Remarks

Each component of the result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is componentwise congruent to to modulo 2 \* PI.

## deltaangle(float4, float4)

Returns the componentwise smallest signed angles in radians that rotate from one float4 vector of angles to another.

```csharp
public static float4 deltaangle(float4 from, float4 to)
```

### Parameters

**** (\[float4]\(/engine/7000.0/script-reference/unity/mathematics/float4)): The start angles in radians.**** (\[float4]\(/engine/7000.0/script-reference/unity/mathematics/float4)): The end angles in radians.

### Returns

| Type                                                                  | Description                                                                     |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [float4](/engine/7000.0/script-reference/unity/mathematics/float4.md) | The componentwise signed differences between the angles in the range -PI to PI. |

### Remarks

Each component of the result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is componentwise congruent to to modulo 2 \* PI.

## deltaangle(double, double)

Returns the smallest signed angle in radians that rotates from one angle to another.

```csharp
public static double deltaangle(double from, double to)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The start angle in radians.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The end angle in radians.

### Returns

| Type                                                           | Description                                                          |
| -------------------------------------------------------------- | -------------------------------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | The signed difference between the two angles in the range -PI to PI. |

### Remarks

The result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is congruent to to modulo 2 \* PI.

## deltaangle(double2, double2)

Returns the componentwise smallest signed angles in radians that rotate from one double2 vector of angles to another.

```csharp
public static double2 deltaangle(double2 from, double2 to)
```

### Parameters

**** (\[double2]\(/engine/7000.0/script-reference/unity/mathematics/double2)): The start angles in radians.**** (\[double2]\(/engine/7000.0/script-reference/unity/mathematics/double2)): The end angles in radians.

### Returns

| Type                                                                    | Description                                                                     |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [double2](/engine/7000.0/script-reference/unity/mathematics/double2.md) | The componentwise signed differences between the angles in the range -PI to PI. |

### Remarks

Each component of the result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is componentwise congruent to to modulo 2 \* PI.

## deltaangle(double3, double3)

Returns the componentwise smallest signed angles in radians that rotate from one double3 vector of angles to another.

```csharp
public static double3 deltaangle(double3 from, double3 to)
```

### Parameters

**** (\[double3]\(/engine/7000.0/script-reference/unity/mathematics/double3)): The start angles in radians.**** (\[double3]\(/engine/7000.0/script-reference/unity/mathematics/double3)): The end angles in radians.

### Returns

| Type                                                                    | Description                                                                     |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [double3](/engine/7000.0/script-reference/unity/mathematics/double3.md) | The componentwise signed differences between the angles in the range -PI to PI. |

### Remarks

Each component of the result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is componentwise congruent to to modulo 2 \* PI.

## deltaangle(double4, double4)

Returns the componentwise smallest signed angles in radians that rotate from one double4 vector of angles to another.

```csharp
public static double4 deltaangle(double4 from, double4 to)
```

### Parameters

**** (\[double4]\(/engine/7000.0/script-reference/unity/mathematics/double4)): The start angles in radians.**** (\[double4]\(/engine/7000.0/script-reference/unity/mathematics/double4)): The end angles in radians.

### Returns

| Type                                                                    | Description                                                                     |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [double4](/engine/7000.0/script-reference/unity/mathematics/double4.md) | The componentwise signed differences between the angles in the range -PI to PI. |

### Remarks

Each component of the result lies in the half-open range \[-PI, PI), and from + deltaangle(from, to) is componentwise congruent to to modulo 2 \* PI.
