max
Platform and version requirements: JVM (1.0), JS (1.0), 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
.
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun <T : Comparable<T>> Array<out T>.max(): T?
fun ByteArray.max(): Byte?
fun ShortArray.max(): Short?
fun LongArray.max(): Long?
fun CharArray.max(): Char?
fun <T : Comparable<T>> Iterable<T>.max(): T?
@ExperimentalUnsignedTypes fun UIntArray.max(): UInt?
@ExperimentalUnsignedTypes fun ULongArray.max(): ULong?
@ExperimentalUnsignedTypes fun UByteArray.max(): UByte?
@ExperimentalUnsignedTypes fun UShortArray.max(): UShort?
Returns the largest element or null
if there are no elements.