ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

clamp two numbers skipping the one in the middle

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
aniello ferrone
clamp two numbers skipping the one in the middle
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
http://www.fanpage.it


Return to posts index

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

This would be one way:

value < 2 ? 1 : 3


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]