Add a note about NaN propagation for floating point specializations.
This commit is contained in:
@@ -159,7 +159,10 @@ fun aggregates(): List<GenericFunction> {
|
||||
if (isFloat && isGeneric)
|
||||
since("1.1")
|
||||
}
|
||||
doc { f -> "Returns the ${if (op == "max") "largest" else "smallest"} ${f.element} or `null` if there are no ${f.element.pluralize()}." }
|
||||
doc { f ->
|
||||
"Returns the ${if (op == "max") "largest" else "smallest"} ${f.element} or `null` if there are no ${f.element.pluralize()}." +
|
||||
if (isFloat) "\n\n" + "If any of ${f.element.pluralize()} is `NaN` returns `NaN`." else ""
|
||||
}
|
||||
returns("T?")
|
||||
|
||||
body {
|
||||
|
||||
@@ -130,6 +130,7 @@ fun comparables(): List<GenericFunction> {
|
||||
If values are equal, returns the first one.
|
||||
"""
|
||||
}
|
||||
// TODO: Add a note about NaN propagation for floats.
|
||||
doc(Primitives) {
|
||||
"""Returns the smaller of two values."""
|
||||
}
|
||||
@@ -154,6 +155,7 @@ fun comparables(): List<GenericFunction> {
|
||||
returns("T")
|
||||
customReceiver("")
|
||||
inline(Primitives) { Inline.Only }
|
||||
// TODO: Add a note about NaN propagation for floats.
|
||||
doc {
|
||||
"""
|
||||
Returns the smaller of three values.
|
||||
@@ -215,6 +217,7 @@ fun comparables(): List<GenericFunction> {
|
||||
If values are equal, returns the first one.
|
||||
"""
|
||||
}
|
||||
// TODO: Add a note about NaN propagation for floats.
|
||||
doc(Primitives) {
|
||||
"""Returns the greater of two values."""
|
||||
}
|
||||
@@ -238,6 +241,7 @@ fun comparables(): List<GenericFunction> {
|
||||
returns("T")
|
||||
customReceiver("")
|
||||
inline(Primitives) { Inline.Only }
|
||||
// TODO: Add a note about NaN propagation for floats.
|
||||
doc {
|
||||
"""
|
||||
Returns the greater of three values.
|
||||
|
||||
Reference in New Issue
Block a user