Clarify floating-point to integral conversion rounding behaviour

This commit is contained in:
Abduqodiri Qurbonzoda
2019-08-13 08:26:15 +03:00
parent fd5bf33861
commit 432828a2db
7 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -336,7 +336,7 @@ internal fun fromInt(value: Int) = Long(value, if (value < 0) -1 else 0)
/**
* Converts this [Double] value to [Long].
* The fractional part, if any, is rounded down.
* The fractional part, if any, is rounded down towards zero.
* Returns zero if this `Double` value is `NaN`, [Long.MIN_VALUE] if it's less than `Long.MIN_VALUE`,
* [Long.MAX_VALUE] if it's bigger than `Long.MAX_VALUE`.
*/