min

Common
JS
Native
1.7
@JvmName("minOrThrow") fun Array<out Double>.min(): Double
(source)
JVM
1.1
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun Array<out Double>.min(): Double?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun Array<out Float>.min(): Float
(source)
JVM
1.1
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun Array<out Float>.min(): Float?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun FloatArray.min(): Float
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun FloatArray.min(): Float?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun DoubleArray.min(): Double
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun DoubleArray.min(): Double?
(source)
Deprecated: Use minOrNull instead.

Returns the smallest element.

If any of elements is NaN returns NaN.

Exceptions

NoSuchElementException - if the array is empty.

Common
JS
Native
1.7
@JvmName("minOrThrow") fun <T : Comparable<T>> Array<out T>.min(): T
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun <T : Comparable<T>> Array<out T>.min(): T?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun ByteArray.min(): Byte
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun ByteArray.min(): Byte?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun ShortArray.min(): Short
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun ShortArray.min(): Short?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun IntArray.min(): Int
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun IntArray.min(): Int?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun LongArray.min(): Long
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun LongArray.min(): Long?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun CharArray.min(): Char
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun CharArray.min(): Char?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow-U") @ExperimentalUnsignedTypes fun UIntArray.min(): UInt
(source)
JVM
1.3
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun UIntArray.min(): UInt?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow-U") @ExperimentalUnsignedTypes fun ULongArray.min(): ULong
(source)
JVM
1.3
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun ULongArray.min(): ULong?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow-U") @ExperimentalUnsignedTypes fun UByteArray.min(): UByte
(source)
JVM
1.3
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun UByteArray.min(): UByte?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow-U") @ExperimentalUnsignedTypes fun UShortArray.min(): UShort
(source)
JVM
1.3
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") @ExperimentalUnsignedTypes fun UShortArray.min(): UShort?
(source)
Deprecated: Use minOrNull instead.

Returns the smallest element.

Exceptions

NoSuchElementException - if the array is empty.

Common
JS
Native
1.7
@JvmName("minOrThrow") fun Iterable<Double>.min(): Double
(source)
JVM
1.1
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun Iterable<Double>.min(): Double?
(source)
Deprecated: Use minOrNull instead.
Common
JS
Native
1.7
@JvmName("minOrThrow") fun Iterable<Float>.min(): Float
(source)
JVM
1.1
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun Iterable<Float>.min(): Float?
(source)
Deprecated: Use minOrNull instead.

Returns the smallest element.

If any of elements is NaN returns NaN.

Exceptions

NoSuchElementException - if the collection is empty.

Common
JS
Native
1.7
@JvmName("minOrThrow") fun <T : Comparable<T>> Iterable<T>.min(): T
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun <T : Comparable<T>> Iterable<T>.min(): T?
(source)
Deprecated: Use minOrNull instead.

Returns the smallest element.

Exceptions

NoSuchElementException - if the collection is empty.