W3cubDocs

/Kotlin

min

Platform and version requirements: JVM (1.2), JS (1.2), 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.

Platform and version requirements: JVM (1.2), JS (1.2), Native (1.2)
fun min(a: Int, b: Int): Int
fun min(a: Long, b: Long): Long

Returns the smaller of two values.

Platform and version requirements: JVM (1.3), JS (1.3), 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.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.math/min.html