Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › If statements holding values

  • Dan Ebberts

    January 8, 2016 at 11:16 am

    Good point. I guess that would be the case as long as the flip is instantaneous and there’s no hysteresis (up and down thresholds are the same).

    Dan

  • Ymri Scheiner

    January 9, 2016 at 5:03 pm

    Thank you a lot ! I’ve tried and it works ! Just to know, what does (n%2) means ?

  • Dan Ebberts

    January 9, 2016 at 6:45 pm

    % is the JavaScript modulus operator, which gives you the remainder of a division operation, so (n%2) will be true if n is an odd number, false if it is an even number (assuming n is an integer, as it is in this case).

    Dan

  • Ymri Scheiner

    January 10, 2016 at 3:45 pm

    Oh ok but shouldn’t you put the ==0, or does it recognize you mean if this equals 0 when you put nohting ?

  • Dan Ebberts

    January 10, 2016 at 5:21 pm

    (n%2 != 0) would give you the same result, but anything that’s not zero gets interpreted as true.

    Dan

Page 2 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy