yampad_kmk/kmk/utils.py
2022-04-27 08:42:19 +10:00

3 lines
69 B
Python

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