Adobe After Effects Expressions Forum
clamp two numbers skipping the one in the middle
clamp two numbers skipping the one in the middle
by aniello ferrone on Oct 10, 2019 at 3:35:12 pm

Hi,

i have this expression on a slider

Math.round(clamp(value, 1, 3));

So the slider goes from position 1, 2 and 3. I want to skip the 2, so that it can go just from 1 to 3, skipping the 2.

How can i do it?

Aniello Ferrone
Viral Video Editor
www.fanpage.it


Re: clamp two numbers skipping the one in the middle
by Dan Ebberts on Oct 10, 2019 at 4:10:11 pm

This would be one way:

value < 2 ? 1 : 3


Dan







© CreativeCOW.net