Processors.Wrap
Extension Method in Processors
Declaration
public static float Wrap(this float input, float min, float max)
Description
Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.
Parameters
input | The input value to wrap. |
min | The minimum value of the range. |
max | The maximum value of the range. |
Returns
float | The wrapped value. |
Overload
Declaration
public static int Wrap(this int input, int min, int max)
Description
Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.
Parameters
input | The input value to wrap. |
min | The minimum value of the range. |
max | The maximum value of the range. |
Returns
int | The wrapped value. |