max

Common
inline fun max(a: UInt, b: UInt): UInt
inline fun max(a: ULong, b: ULong): ULong

Returns the greater of two values.

Since Kotlin

1.5
fun max(a: Double, b: Double): Double
fun max(a: Float, b: Float): Float
inline fun max(a: Double, b: Double): Double
inline fun max(a: Float, b: Float): Float
inline fun max(a: Double, b: Double): Double
inline fun max(a: Float, b: Float): Float
fun max(a: Double, b: Double): Double
fun max(a: Float, b: Float): Float

Returns the greater of two values.

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

Since Kotlin

1.2
fun max(a: Int, b: Int): Int
fun max(a: Long, b: Long): Long
inline fun max(a: Int, b: Int): Int
inline fun max(a: Long, b: Long): Long
inline fun max(a: Int, b: Int): Int
inline fun max(a: Long, b: Long): Long
fun max(a: Int, b: Int): Int
fun max(a: Long, b: Long): Long

Returns the greater of two values.

Since Kotlin

1.2