MinMaxMatrix

Declaration: MinMaxMatrix (Data: TDouble2DArray; FirstCol, FirstRow, LastCol, LastRow: integer; var min, max: double): integer;
Calculates the minimum and the maximum of the data contained in the two-dimensional array Data, using all values in the rectangular region defined by [FirstCol,FirstRow] and [LastCol,LastRow] (the array Data has 0-based indices). If FirstCol or FirstRow is greater than LastCol or LastRow the parameters are automatically exchanged.

The function returns the following error codes:

 0 ... everything is OK
-1 ... FirstCol, FirstRow, LastCol and/or LastRow are out of range