maxOf
fun <T : Comparable<T>> maxOf(a: T, b: T): T
(Common source) (JVM source) (JS source) (Native source)
Returns the greater of two values.
If values are equal, returns the first one.
fun <T : Comparable<T>> maxOf(a: T, b: T, c: T): T
(Common source) (JVM source) (JS source) (Native source)
Returns the greater of three values.
If there are multiple equal maximal values, returns the first of them.
fun maxOf(a: Short, b: Short, c: Short): Short
(Common source) (JVM source) (JS source) (Native source)
Returns the greater of three values.
fun maxOf(a: Float, b: Float, c: Float): Float
(Common source) (JVM source) (JS source) (Native source)
fun maxOf(a: Double, b: Double, c: Double): Double
(Common source) (JVM source) (JS source) (Native source)
Returns the greater of three values.
If any value is NaN
, returns NaN
.
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.
Returns the greater of two values according to the order specified by the given comparator.
If values are equal, returns the first one.
fun <T : Comparable<T>> maxOf(a: T, vararg other: T): T
(Common source) (JVM source) (JS source) (Native source)
Returns the greater of the given values.
If there are multiple equal maximal values, returns the first of them.
fun maxOf(a: Byte, vararg other: Byte): Byte
(Common source) (JVM source) (JS source) (Native source)
fun maxOf(a: Short, vararg other: Short): Short
(Common source) (JVM source) (JS source) (Native source)
fun maxOf(a: Long, vararg other: Long): Long
(Common source) (JVM source) (JS source) (Native source)
Returns the greater of the given values.
fun maxOf(a: Float, vararg other: Float): Float
(Common source) (JVM source) (JS source) (Native source)
fun maxOf(a: Double, vararg other: Double): Double
(Common source) (JVM source) (JS source) (Native source)
Returns the greater of the given values.
If any value is NaN
, returns NaN
.
Returns the greater of the given values according to the order specified by the given comparator.
If there are multiple equal maximal values, returns the first of them.
Returns the greater of two values.
Returns the greater of three values.
Returns the greater of the given values.