Notifications
Clear all

[Closed] constain function

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
(@denist)
Joined: 11 months ago

Posts: 0

there is no. but the way how to make this function is:


fn constrain value minimum maximum = (amax minimum (amin maximum value))

great. thank you denisT !