docs: mod/rem: clarify who is dividend and divisor

This commit is contained in:
Paŭlo Ebermann
2022-09-30 14:41:55 +02:00
committed by GitHub
parent 5772230357
commit 418c530820
8 changed files with 92 additions and 92 deletions
+2 -2
View File
@@ -71,14 +71,14 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) {
"Divides this value by the other value, flooring the result to an integer that is closer to negative infinity."
"rem" -> {
"""
Calculates the remainder of truncating division of this value by the other value.
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
The result is either zero or has the same sign as the _dividend_ and has the absolute value less than the absolute value of the divisor.
""".trimIndent()
}
"mod" -> {
"""
Calculates the remainder of flooring division of this value by the other value.
Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).
The result is either zero or has the same sign as the _divisor_ and has the absolute value less than the absolute value of the divisor.
""".trimIndent() + if (operand1.isFloatingPoint)
+2 -2
View File
@@ -41,14 +41,14 @@ class UnsignedTypeGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIns
""".trimIndent()
"rem" -> {
"""
Calculates the remainder of truncating division of this value by the other value.
Calculates the remainder of truncating division of this value (dividend) by the other value (divisor).
The result is always less than the divisor.
""".trimIndent()
}
"mod" -> {
"""
Calculates the remainder of flooring division of this value by the other value.
Calculates the remainder of flooring division of this value (dividend) by the other value (divisor).
The result is always less than the divisor.