maxOf

fun <T> maxOf(a: T, b: T, c: T, comparator: Comparator<in T>): T(source)

Returns the greater of three values according to the order specified by the given comparator.

If there are multiple equal maximal values, returns the first of them.

Since Kotlin

1.1

fun <T> maxOf(a: T, b: T, comparator: Comparator<in T>): T(source)

Returns the greater of two values according to the order specified by the given comparator.

If values are equal, returns the first one.

Since Kotlin

1.1

expect fun <T : Comparable<T>> maxOf(a: T, b: T): T(source)

Returns the greater of two values.

If values are equal, returns the first one.

Since Kotlin

1.1

expect inline fun maxOf(a: Byte, b: Byte): Byte(source)
expect inline fun maxOf(a: Short, b: Short): Short(source)
expect inline fun maxOf(a: Int, b: Int): Int(source)
expect inline fun maxOf(a: Long, b: Long): Long(source)

Returns the greater of two values.

Since Kotlin

1.1

expect inline fun maxOf(a: Float, b: Float): Float(source)
expect inline fun maxOf(a: Double, b: Double): Double(source)

Returns the greater of two values.

If either value is NaN, returns NaN.

Since Kotlin

1.1

expect fun <T : Comparable<T>> maxOf(a: T, b: T, c: T): T(source)

Returns the greater of three values.

If there are multiple equal maximal values, returns the first of them.

Since Kotlin

1.1

expect inline fun maxOf(a: Byte, b: Byte, c: Byte): Byte(source)
expect inline fun maxOf(a: Short, b: Short, c: Short): Short(source)
expect inline fun maxOf(a: Int, b: Int, c: Int): Int(source)
expect inline fun maxOf(a: Long, b: Long, c: Long): Long(source)

Returns the greater of three values.

Since Kotlin

1.1

expect inline fun maxOf(a: Float, b: Float, c: Float): Float(source)
expect inline fun maxOf(a: Double, b: Double, c: Double): Double(source)

Returns the greater of three values.

If any value is NaN, returns NaN.

Since Kotlin

1.1