Documentation

Unity Engine

Download Unity

Unity Engine

unwind

Returns the angle x wrapped to the range -PI to PI.
Read time 3 minutesLast updated 5 days ago

Definition

unwind(float)

Returns the angle x wrapped to the range -PI to PI.
public static float unwind(float x)

Parameters

Angle in radians.

Returns

Type

Description

floatThe equivalent angle in the range -PI to PI.

Remarks

The result is congruent to x modulo 2 * PI and lies in the half-open range [-PI, PI).

unwind(float2)

Returns the componentwise angles of a float2 vector wrapped to the range -PI to PI.
public static float2 unwind(float2 x)

Parameters

Angles in radians.

Returns

Type

Description

float2The componentwise equivalent angles in the range -PI to PI.

Remarks

Each component of the result is congruent to the input component modulo 2 * PI and lies in the half-open range [-PI, PI).

unwind(float3)

Returns the componentwise angles of a float3 vector wrapped to the range -PI to PI.
public static float3 unwind(float3 x)

Parameters

Angles in radians.

Returns

Type

Description

float3The componentwise equivalent angles in the range -PI to PI.

Remarks

Each component of the result is congruent to the input component modulo 2 * PI and lies in the half-open range [-PI, PI).

unwind(float4)

Returns the componentwise angles of a float4 vector wrapped to the range -PI to PI.
public static float4 unwind(float4 x)

Parameters

Angles in radians.

Returns

Type

Description

float4The componentwise equivalent angles in the range -PI to PI.

Remarks

Each component of the result is congruent to the input component modulo 2 * PI and lies in the half-open range [-PI, PI).

unwind(double)

Returns the angle x wrapped to the range -PI to PI.
public static double unwind(double x)

Parameters

Angle in radians.

Returns

Type

Description

doubleThe equivalent angle in the range -PI to PI.

Remarks

The result is congruent to x modulo 2 * PI and lies in the half-open range [-PI, PI).

unwind(double2)

Returns the componentwise angles of a double2 vector wrapped to the range -PI to PI.
public static double2 unwind(double2 x)

Parameters

Angles in radians.

Returns

Type

Description

double2The componentwise equivalent angles in the range -PI to PI.

Remarks

Each component of the result is congruent to the input component modulo 2 * PI and lies in the half-open range [-PI, PI).

unwind(double3)

Returns the componentwise angles of a double3 vector wrapped to the range -PI to PI.
public static double3 unwind(double3 x)

Parameters

Angles in radians.

Returns

Type

Description

double3The componentwise equivalent angles in the range -PI to PI.

Remarks

Each component of the result is congruent to the input component modulo 2 * PI and lies in the half-open range [-PI, PI).

unwind(double4)

Returns the componentwise angles of a double4 vector wrapped to the range -PI to PI.
public static double4 unwind(double4 x)

Parameters

Angles in radians.

Returns

Type

Description

double4The componentwise equivalent angles in the range -PI to PI.

Remarks

Each component of the result is congruent to the input component modulo 2 * PI and lies in the half-open range [-PI, PI).