deltaangle
Returns the smallest signed angle in radians that rotates from one angle to another.
Read time 3 minutesLast updated 5 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
deltaangle(float, float)
Returns the smallest signed angle in radians that rotates from one angle to another.
public static float deltaangle(float from, float to)
Parameters
Returns
Type | Description |
|---|---|
| float | 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.
public static float2 deltaangle(float2 from, float2 to)
Parameters
Returns
Type | Description |
|---|---|
| float2 | 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.
public static float3 deltaangle(float3 from, float3 to)
Parameters
Returns
Type | Description |
|---|---|
| float3 | 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.
public static float4 deltaangle(float4 from, float4 to)
Parameters
Returns
Type | Description |
|---|---|
| float4 | 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.
public static double deltaangle(double from, double to)
Parameters
Returns
Type | Description |
|---|---|
| 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.
public static double2 deltaangle(double2 from, double2 to)
Parameters
Returns
Type | Description |
|---|---|
| double2 | 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.
public static double3 deltaangle(double3 from, double3 to)
Parameters
Returns
Type | Description |
|---|---|
| double3 | 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.
public static double4 deltaangle(double4 from, double4 to)
Parameters
Returns
Type | Description |
|---|---|
| double4 | 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.