python maths max value capped at x

Solutions on MaxInterview for python maths max value capped at x by the best coders in the world

showing results for - "python maths max value capped at x"
Henry
24 Jul 2018
1def clamp(n, minn, maxn):
2    return max(min(maxn, n), minn)