Name

constrain()

Examples
print(constrain(55, 30, 70)) # Prints "55"
print(constrain(100, 30, 70)) # Prints "70"
print(constrain(-15, 30, 70)) # Prints "30"
Description
Syntax
constrain(amt, low, high)
Parameters
amt
low
high
Related max()
min()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License