Document NaN propagation in top-level minOf/maxOf functions
This commit is contained in:
@@ -14,6 +14,7 @@ import kotlin.js.*
|
||||
|
||||
/**
|
||||
* Returns the greater of two values.
|
||||
*
|
||||
* If values are equal, returns the first one.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@@ -62,6 +63,8 @@ public actual inline fun maxOf(a: Long, b: Long): Long {
|
||||
|
||||
/**
|
||||
* Returns the greater of two values.
|
||||
*
|
||||
* If either value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -72,6 +75,8 @@ public actual inline fun maxOf(a: Float, b: Float): Float {
|
||||
|
||||
/**
|
||||
* Returns the greater of two values.
|
||||
*
|
||||
* If either value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -82,6 +87,8 @@ public actual inline fun maxOf(a: Double, b: Double): Double {
|
||||
|
||||
/**
|
||||
* Returns the greater of three values.
|
||||
*
|
||||
* If there are multiple equal maximal values, returns the first of them.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
public actual fun <T : Comparable<T>> maxOf(a: T, b: T, c: T): T {
|
||||
@@ -129,6 +136,8 @@ public actual inline fun maxOf(a: Long, b: Long, c: Long): Long {
|
||||
|
||||
/**
|
||||
* Returns the greater of three values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -139,6 +148,8 @@ public actual inline fun maxOf(a: Float, b: Float, c: Float): Float {
|
||||
|
||||
/**
|
||||
* Returns the greater of three values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -148,7 +159,9 @@ public actual inline fun maxOf(a: Double, b: Double, c: Double): Double {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the greater of given values.
|
||||
* Returns the greater of the given values.
|
||||
*
|
||||
* If there are multiple equal maximal values, returns the first of them.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun <T : Comparable<T>> maxOf(a: T, vararg other: T): T {
|
||||
@@ -158,7 +171,7 @@ public actual fun <T : Comparable<T>> maxOf(a: T, vararg other: T): T {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the greater of given values.
|
||||
* Returns the greater of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun maxOf(a: Byte, vararg other: Byte): Byte {
|
||||
@@ -168,7 +181,7 @@ public actual fun maxOf(a: Byte, vararg other: Byte): Byte {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the greater of given values.
|
||||
* Returns the greater of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun maxOf(a: Short, vararg other: Short): Short {
|
||||
@@ -178,7 +191,7 @@ public actual fun maxOf(a: Short, vararg other: Short): Short {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the greater of given values.
|
||||
* Returns the greater of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun maxOf(a: Int, vararg other: Int): Int {
|
||||
@@ -188,7 +201,7 @@ public actual fun maxOf(a: Int, vararg other: Int): Int {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the greater of given values.
|
||||
* Returns the greater of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun maxOf(a: Long, vararg other: Long): Long {
|
||||
@@ -198,7 +211,9 @@ public actual fun maxOf(a: Long, vararg other: Long): Long {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the greater of given values.
|
||||
* Returns the greater of the given values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun maxOf(a: Float, vararg other: Float): Float {
|
||||
@@ -208,7 +223,9 @@ public actual fun maxOf(a: Float, vararg other: Float): Float {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the greater of given values.
|
||||
* Returns the greater of the given values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun maxOf(a: Double, vararg other: Double): Double {
|
||||
@@ -219,6 +236,7 @@ public actual fun maxOf(a: Double, vararg other: Double): Double {
|
||||
|
||||
/**
|
||||
* Returns the smaller of two values.
|
||||
*
|
||||
* If values are equal, returns the first one.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@@ -267,6 +285,8 @@ public actual inline fun minOf(a: Long, b: Long): Long {
|
||||
|
||||
/**
|
||||
* Returns the smaller of two values.
|
||||
*
|
||||
* If either value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -277,6 +297,8 @@ public actual inline fun minOf(a: Float, b: Float): Float {
|
||||
|
||||
/**
|
||||
* Returns the smaller of two values.
|
||||
*
|
||||
* If either value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -287,6 +309,8 @@ public actual inline fun minOf(a: Double, b: Double): Double {
|
||||
|
||||
/**
|
||||
* Returns the smaller of three values.
|
||||
*
|
||||
* If there are multiple equal minimal values, returns the first of them.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
public actual fun <T : Comparable<T>> minOf(a: T, b: T, c: T): T {
|
||||
@@ -334,6 +358,8 @@ public actual inline fun minOf(a: Long, b: Long, c: Long): Long {
|
||||
|
||||
/**
|
||||
* Returns the smaller of three values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -344,6 +370,8 @@ public actual inline fun minOf(a: Float, b: Float, c: Float): Float {
|
||||
|
||||
/**
|
||||
* Returns the smaller of three values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -353,7 +381,9 @@ public actual inline fun minOf(a: Double, b: Double, c: Double): Double {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smaller of given values.
|
||||
* Returns the smaller of the given values.
|
||||
*
|
||||
* If there are multiple equal minimal values, returns the first of them.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun <T : Comparable<T>> minOf(a: T, vararg other: T): T {
|
||||
@@ -363,7 +393,7 @@ public actual fun <T : Comparable<T>> minOf(a: T, vararg other: T): T {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smaller of given values.
|
||||
* Returns the smaller of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun minOf(a: Byte, vararg other: Byte): Byte {
|
||||
@@ -373,7 +403,7 @@ public actual fun minOf(a: Byte, vararg other: Byte): Byte {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smaller of given values.
|
||||
* Returns the smaller of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun minOf(a: Short, vararg other: Short): Short {
|
||||
@@ -383,7 +413,7 @@ public actual fun minOf(a: Short, vararg other: Short): Short {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smaller of given values.
|
||||
* Returns the smaller of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun minOf(a: Int, vararg other: Int): Int {
|
||||
@@ -393,7 +423,7 @@ public actual fun minOf(a: Int, vararg other: Int): Int {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smaller of given values.
|
||||
* Returns the smaller of the given values.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun minOf(a: Long, vararg other: Long): Long {
|
||||
@@ -403,7 +433,9 @@ public actual fun minOf(a: Long, vararg other: Long): Long {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smaller of given values.
|
||||
* Returns the smaller of the given values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun minOf(a: Float, vararg other: Float): Float {
|
||||
@@ -413,7 +445,9 @@ public actual fun minOf(a: Float, vararg other: Float): Float {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smaller of given values.
|
||||
* Returns the smaller of the given values.
|
||||
*
|
||||
* If any value is `NaN`, returns `NaN`.
|
||||
*/
|
||||
@SinceKotlin("1.4")
|
||||
public actual fun minOf(a: Double, vararg other: Double): Double {
|
||||
|
||||
Reference in New Issue
Block a user