how does clamp work?
Moderator: Moderators
how does clamp work?
do you put it in before you assign a value or after?
Hi Paradan,
It doesn't matter all that much .. but using the function directly when assigning a value is a fraction faster.
Personally I usually go with what benefits the readability / easy-of-use of my code when the performance difference is marginal.
K
It doesn't matter all that much .. but using the function directly when assigning a value is a fraction faster.
Code: Select all
// Indirect
T = App.Time;
T = clamp(T,0,1);
// Direct
T = clamp(App.Time,0,1);
K