Documentation

Unity Engine

Download Unity

Unity Engine

deltaangle

Returns the smallest signed angle in radians that rotates from one angle to another.
Read time 3 minutesLast updated 5 days ago

Definition

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

from

The start angle in radians.

The end angle in radians.

Returns

Type

Description

floatThe 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

from

The start angles in radians.

The end angles in radians.

Returns

Type

Description

float2The 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

from

The start angles in radians.

The end angles in radians.

Returns

Type

Description

float3The 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

from

The start angles in radians.

The end angles in radians.

Returns

Type

Description

float4The 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

from

The start angle in radians.

The end angle in radians.

Returns

Type

Description

doubleThe 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

The start angles in radians.

The end angles in radians.

Returns

Type

Description

double2The 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

The start angles in radians.

The end angles in radians.

Returns

Type

Description

double3The 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

The start angles in radians.

The end angles in radians.

Returns

Type

Description

double4The 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.