Processors.Normalize

Static Method in Processors

Declaration

public static float Normalize(float input, float min, float max, float zero = 0F)

Description

Normalizes the input value in the range [min..max] to unsigned normalized form [0..1] if the min is >= zero, and to signed normalized form [-1..1] if the min is < zero.

Parameters

inputThe input value to normalize.
minThe minimum value of the range.
maxThe maximum value of the range.
zero

Returns

floatThe normalized input value.

Overload

Declaration

public static double Normalize(double input, double min, double max, double zero = 0)

Description

Normalizes the input value in the range [min..max] to unsigned normalized form [0..1] if the min is >= zero, and to signed normalized form [-1..1] if the min is < zero.

Parameters

inputThe input value to normalize.
minThe minimum value of the range.
maxThe maximum value of the range.
zero

Returns

doubleThe normalized input value.

Overload

Declaration

public static Vector2 Normalize(Vector2 input)

Description

Normalizes the input vector to be of unit length (1). This is the same as calling Vector2.normalized.

Parameters

inputThe input value to normalize.

Returns

Vector2The normalized input value.

Overload

Declaration

public static Vector3 Normalize(Vector3 input)

Description

Normalizes the input vector to be of unit length (1). This is the same as calling Vector3.normalized.

Parameters

inputThe input value to normalize.

Returns

Vector3The normalized input value.

Overload

Declaration

public static Vector4 Normalize(Vector4 input)

Description

Normalizes the input vector to be of unit length (1). This is the same as calling Vector4.normalized.

Parameters

inputThe input value to normalize.

Returns

Vector4The normalized input value.