clamp method
Clamps this to min..max.
NOTE: shadowed by num.clamp. See NumExtension.clamp.
Implementation
int clamp(int min, int max) {
if (this < min) {
return min;
} else if (this > max) {
return max;
} else {
return this;
}
}