Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python maths max value capped at x

def clamp(n, minn, maxn):
    return max(min(maxn, n), minn)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #maths #max #capped
ADD COMMENT
Topic
Name
6+7 =