arrays.max

Supported in:
arrays.max(array_of_ints_or_floats)

Description

Returns the greatest element in an array or zero if the array is empty.

Param data types

ARRAY_INTS|ARRAY_FLOATS

Return type

FLOAT

Code samples

Here are some examples of how to use the function:

Example 1

This example returns the greater element in an array of integers.

arrays.max([10, 20]) = 20.000000
Example 2

This example returns the greater element in an array of floats.

arrays.max([10.000000, 20.000000]) = 20.000000