max

Common
JVM
JS
Native
1.0
fun Array<out Double>.max(): Double?
fun Array<out Float>.max(): Float?
fun FloatArray.max(): Float?
fun DoubleArray.max(): Double?
fun Iterable<Double>.max(): Double?
fun Iterable<Float>.max(): Float?

Returns the largest element or null if there are no elements.

If any of elements is NaN returns NaN.

Common
JVM
JS
Native
1.0
fun <T : Comparable<T>> Array<out T>.max(): T?
fun ByteArray.max(): Byte?
fun ShortArray.max(): Short?
fun IntArray.max(): Int?
fun LongArray.max(): Long?
fun CharArray.max(): Char?
fun <T : Comparable<T>> Iterable<T>.max(): T?

Returns the largest element or null if there are no elements.