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
vintThe value to be clamped.
minintThe lower bound of the result.
maxintThe upper bound of the result.