minOf
fun <T : Comparable<T>> minOf(a: T, b: T): T
Returns the smaller of two values.
If values are equal, returns the first one.
Returns the smaller of two values.
Returns the smaller of two values.
If either value is NaN
, returns NaN
.
fun <T : Comparable<T>> minOf(a: T, b: T, c: T): T
Returns the smaller of three values.
If there are multiple equal minimal values, returns the first of them.
Returns the smaller of three values.
Returns the smaller of three values.
If any value is NaN
, returns NaN
.
fun <T> minOf(
a: T,
b: T,
c: T,
comparator: Comparator<in T>
): T
Returns the smaller of three values according to the order specified by the given comparator.
If there are multiple equal minimal values, returns the first of them.
fun <T> minOf(a: T, b: T, comparator: Comparator<in T>): T
Returns the smaller of two values according to the order specified by the given comparator.
If values are equal, returns the first one.
fun <T : Comparable<T>> minOf(a: T, vararg other: T): T
Returns the smaller of the given values.
If there are multiple equal minimal values, returns the first of them.
Returns the smaller of the given values.
Returns the smaller of the given values.
If any value is NaN
, returns NaN
.
fun <T> minOf(
a: T,
vararg other: T,
comparator: Comparator<in T>
): T
Returns the smaller of the given values according to the order specified by the given comparator.
If there are multiple equal minimal values, returns the first of them.
Returns the smaller of two values.
Returns the smaller of three values.
Returns the smaller of the given values.