Kotlin imbriqué si l'expression

fun main(args: Array<String>) {
    val n1 = 3
    val n2 = 5
    val n3 = -2
   val max = if (n1 > n2) {
        if (n1 > n3)
            n1
        else
            n3
    } else {
        if (n2 > n3)
            n2
        else
            n3
    }

    println("max = $max")
}
SAMER SAEID