Processors.Clamp
Static Method in Processors
Declaration
public static float Clamp(float input, float min, float max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
float | The clamped input value. |
Overload
Declaration
public static double Clamp(double input, double min, double max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
double | The clamped input value. |
Overload
Declaration
public static int Clamp(int input, int min, int max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
int | The clamped input value. |
Overload
Declaration
public static Vector2 Clamp(Vector2 input, Vector2 min, Vector2 max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
Vector2 | The clamped input value. |
Overload
Declaration
public static Vector2Int Clamp(Vector2Int input, Vector2Int min, Vector2Int max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
Vector2Int | The clamped input value. |
Overload
Declaration
public static Vector3 Clamp(Vector3 input, Vector3 min, Vector3 max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
Vector3 | The clamped input value. |
Overload
Declaration
public static Vector3Int Clamp(Vector3Int input, Vector3Int min, Vector3Int max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
Vector3Int | The clamped input value. |
Overload
Declaration
public static Vector4 Clamp(Vector4 input, Vector4 min, Vector4 max)
Description
Clamps the input to the range [min..max].
Parameters
input | The input value to clamp. |
min | The minimum value. |
max | The maximum value. |
Returns
Vector4 | The clamped input value. |