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
@@ -241,7 +241,7 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
"""
} else {
"""
* The fractional part, if any, is rounded down.
* The fractional part, if any, is rounded down towards zero.
* Returns zero if this `$thisName` value is `NaN`, [$otherName.MIN_VALUE] if it's less than `$otherName.MIN_VALUE`,
* [$otherName.MAX_VALUE] if it's bigger than `$otherName.MAX_VALUE`.
*/
+1 -1
View File
@@ -349,7 +349,7 @@ class UnsignedTypeGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIns
/**
* Converts this [$otherName] value to [$className].
*
* The fractional part, if any, is rounded down.
* The fractional part, if any, is rounded down towards zero.
* Returns zero if this `$otherName` value is negative or `NaN`, [$className.MAX_VALUE] if it's bigger than `$className.MAX_VALUE`.
*/
""".trimIndent()