static int clipInt(int min, int max, int i) { ret max(min, min(max, i)); }