Notifications
Clear all

[Closed] max and min functions?

Hello guys.
Does anyone know if there is in maxscript a function like the max and min you can use in expressions? (or even better like the clamp function in MEL?)
What I need to do is to add 8 values, but only if they are above 0. So if it was an expression it would have been:

max(0,a) + max(0,b) + max(0,c) etc...

… and that is going to be inside a script controller…

thanks

2 Replies

in maxscript it is, amax ( <array> | {value} ) amin ( <array> | {value}) for example :

(amax 0 a) + (amax 0 b) + (amax 0 c)

thanks! I was sure that there should be something!