Notifications
Clear all
[Closed] constain function
Sep 08, 2012 3:03 pm
Hello guys, i have a small programming question. In Processing programming language there is a function called constrain() that constrains a value to not exceed a maximum and minimum value. Like this : constrain(value, low, high)
it can take integers or floats.
is there something similar in maxscript ?
thanks
2 Replies
1 Reply
there is no. but the way how to make this function is:
fn constrain value minimum maximum = (amax minimum (amin maximum value))