cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add min, max functions to the Array class

Add min, max functions to the Array class

I was looking for the listmax function but it says: "Deprecated, use the array class"

But the array class does not have a max property. So it would be nice if max, min would be added.

Other option would be if the max method of the Math class would accept an array but I guess that is less intuitive

5 Comments

@steven.hamoen, until there is a method, you can use a table.query ordered ascending or descending to get min or max value.

table.query on an array

SCHamoen
Advisor

@Jörg Vogel Thanks I'm aware of that but this is case of just 9 numbers in a table so a query would create a lot of overhead. I currently used the findmax() function.

We have plans to add an overload to Math.min and Math.max that takes an array. This should satisfy this request and this one.

nmzenke
Enthusiast

@Matthew Gillespie Has this functionality been added in yet?

No, not yet. We might be able to get it into 19.2.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea