Add a note about NaN propagation for floating point specializations.

This commit is contained in:
Ilya Gorbunov
2017-01-09 23:53:21 +03:00
parent 897e9658ac
commit 3bf38e62c8
11 changed files with 104 additions and 1 deletions
@@ -767,12 +767,16 @@ public header inline fun <T> Iterable<T>.forEachIndexed(action: (Int, T) -> Unit
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Double>.max(): Double?
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Float>.max(): Float?
@@ -794,12 +798,16 @@ public header fun <T> Iterable<T>.maxWith(comparator: Comparator<in T>): T?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Double>.min(): Double?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Float>.min(): Float?