def clamp(x, bottom=0, top=100): return min(max(bottom, x), top)