max

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

Returns the greater of two values.

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

Common
JVM
JS
Native
1.2
fun max(a: Long, b: Long): Long
(Common source) (JVM source) (JS source) (Native source)

Returns the greater of two values.

Common
JVM
JS
Native
1.5
fun max(a: UInt, b: UInt): UInt
(source)
fun max(a: ULong, b: ULong): ULong
(source)

Returns the greater of two values.