Clarify floating-point to integral conversion rounding behaviour
This commit is contained in:
@@ -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`.
|
||||
*/
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user