Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Obtaining the minimum value of an array

  • Dan Ebberts

    November 18, 2014 at 5:56 pm

    This seems to work:

    myArray = [5,4,3,2,1,0,-1,0,-3.3,2,3,4,5];
    myMin = Math.min.apply(Math,myArray);

    Dan

  • Xavier Gomez

    November 18, 2014 at 8:11 pm

    Dan,
    i tested this and obtained 4.
    Can it have something to do with the AE version (CS5.5 for me)?

    Xavier.

  • Dan Ebberts

    November 18, 2014 at 8:29 pm

    Interesting. Appears to work for CS6, breaks at CS5.5. Maybe it’s the version of JavaScript supported.

  • Xavier Gomez

    November 18, 2014 at 8:42 pm

    OK thank you.

    I’m surprised, i thought that the javascript implementation was the same across all versions, with only the object model growing from time to time.

    Xavier.

  • Dan Ebberts

    November 18, 2014 at 8:47 pm

    You could be right–it might be something else.

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