Method Clamp
Clamp(int, int, int)
Clamps an integer value to the specified range.
Declaration
public static int Clamp(int value, int lowerBound, int upperBound)
Parameters
Type | Name | Description |
---|---|---|
int | value | The value to clamp. |
int | lowerBound | The lowest value that the clamped value can be. |
int | upperBound | The highest value that the clamped value can be. |
Returns
Type | Description |
---|---|
int | A value clamped inside the range of |