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
| input | The input value to normalize. |
| min | The minimum value of the range. |
| max | The maximum value of the range. |
| zero |
Returns
| float | The 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
| input | The input value to normalize. |
| min | The minimum value of the range. |
| max | The maximum value of the range. |
| zero |
Returns
| double | The 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
| input | The input value to normalize. |
Returns
| Vector2 | The 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
| input | The input value to normalize. |
Returns
| Vector3 | The 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
| input | The input value to normalize. |
Returns
| Vector4 | The normalized input value. |