min

Common
JVM
JS
Native
1.2
fun min(a: Double, b: Double): Double
fun min(a: Float, b: Float): Float

Returns the smaller of two values.

If either value is NaN, then the result is NaN.

Common
JVM
JS
Native
1.2
fun min(a: Int, b: Int): Int
fun min(a: Long, b: Long): Long

Returns the smaller of two values.

Common
JVM
JS
Native
1.3
@ExperimentalUnsignedTypes fun min(a: UInt, b: UInt): UInt
@ExperimentalUnsignedTypes fun min(a: ULong, b: ULong): ULong

Returns the smaller of two values.