Processors.Wrap
Declaration
public static float Wrap(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 |
Declaration
public static double Wrap(double input, double min, double 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
double |
Declaration
public static int Wrap(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 |
Declaration
public static Vector2 Wrap(Vector2 input, Vector2 min, Vector2 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
Vector2 |
Declaration
public static Vector2Int Wrap(Vector2Int input, Vector2Int min, Vector2Int 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
Vector2Int |
Declaration
public static Vector3 Wrap(Vector3 input, Vector3 min, Vector3 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
Vector3 |
Declaration
public static Vector3Int Wrap(Vector3Int input, Vector3Int min, Vector3Int 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
Vector3Int |
Declaration
public static Vector4 Wrap(Vector4 input, Vector4 min, Vector4 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
Vector4 |