min/max functions accept arrays as parameters
-
The availability of arrays in V3.5.0b1 is great!
It would be great if some of the comparative functions such as min() and max() were also extended to allow an array to be passed.
At present if I have
global myArray = {1,2,3}
I can do
echo min(global.myArray[0],global.myArray[1],global.myArray[2])
but I can't do
echo min(global.myArray)
Even as I type I realize that because array elements can themselves be an array, this may be difficult, but it would be good if it were possible for "standard" arrays as these could be created dynamically where the number of elements was unknown, making hard coding difficult.
-
@OwenD thanks for your suggestion. I'll add it to the work list for 3.5. I don't think it will be difficult to do.
-
@dc42
Thanks for implementing this so quickly.
Can we also have the other math functions extended as time permits?
abs()
mod()
etc...