Copy link to clipboard
Copied
I want to do a expression to put in slider control that make a interpolation between two values; 0 to 22
And when get 22, restart to 0 again, so, if the time is 23, slide get 1, and if time is 45, 1 again, and so on.
Try this:
value%22
Dan
Copy link to clipboard
Copied
Try this:
value%22
Dan
Copy link to clipboard
Copied
Oh, yes, this is learned at school, it's the rest, or module.
It seems that I spent a lot of time without creating codes and I stay out of practice, this solution don't even crossed my mind ... thank you!
Copy link to clipboard
Copied
Hi Dan,
I can't find any reference elsewhere about using the percentage sign in expressions.
What does it mean in this context? And what else could it used for?
#eagertolearn
Nowa
Copy link to clipboard
Copied
It's the JavaScript modulo operator. It's like division except that it just returns the remainder.
Dan
Copy link to clipboard
Copied
Aaaaaahhhh... Good stuff.
Thanks!