max

Returns the greater of two values.

inline fun max(a: UInt, b: UInt): UInt(source)
fun main() {
    val a: UInt = 10u
    val b: UInt = 20u

    val maximum = max(a, b)

    println("The maximum of $a and $b is $maximum")
}

Source