Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

clamp number in python

def clamp(num, min, max):
    if num > max:
        return max
    elif num < min:
        return min
    else:
        return num
 
PREVIOUS NEXT
Tagged: #clamp #number #python
ADD COMMENT
Topic
Name
7+9 =