Min\max Value Out Of An Array

Hi

just a little question.

i got a float array with some numbers in it.
now i want to have the minimun and the maximun value out of all elements in the array.

may someone knows how to do this. maybe there already exists a function for that which i don't know.

thx for help

greetz geist

You can try sorting the float values within the array by using something like:

float $list[]={65.4, 0.2, 5.2, 10.6, 1.7};
$list = sort $list;

Then by accessing the first or last element of the array you can have the smallest or largest float within it respectivelly:

print ("\nLargest float: " + ($list[size ($list )-1]));
print ("\nSmallest float: " + ($list[0]));

Hi Segmoria

that works well ... thanks !!!!

greetz geist