Method Clamp
Clamp(int, int, int)
Returns int value clamped to the inclusive range of min and max.
public static int Clamp(int v, int min, int max)
Parameters
v
intThe value to be clamped.
min
intThe lower bound of the result.
max
intThe upper bound of the result.