From 34de2d9155733cd907b5bd412dcc3e1ea56fa478 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 30 Sep 2022 14:16:30 +0200 Subject: [PATCH] Trim trailing spaces in generated docs of builtins --- core/builtins/native/kotlin/Primitives.kt | 72 +++++++++---------- generators/builtins/common.kt | 4 +- .../stdlib/src/kotlin/util/FloorDivMod.kt | 48 ++++++------- libraries/stdlib/unsigned/src/kotlin/UByte.kt | 32 ++++----- libraries/stdlib/unsigned/src/kotlin/UInt.kt | 32 ++++----- libraries/stdlib/unsigned/src/kotlin/ULong.kt | 32 ++++----- .../stdlib/unsigned/src/kotlin/UShort.kt | 32 ++++----- 7 files changed, 126 insertions(+), 126 deletions(-) diff --git a/core/builtins/native/kotlin/Primitives.kt b/core/builtins/native/kotlin/Primitives.kt index 51bf720ab8b..b3c977efddd 100644 --- a/core/builtins/native/kotlin/Primitives.kt +++ b/core/builtins/native/kotlin/Primitives.kt @@ -162,7 +162,7 @@ public class Byte private constructor() : Number(), Comparable { /** * 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. */ @SinceKotlin("1.1") @@ -170,7 +170,7 @@ public class Byte private constructor() : Number(), Comparable { public operator fun rem(other: Byte): Int /** * 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. */ @SinceKotlin("1.1") @@ -178,7 +178,7 @@ public class Byte private constructor() : Number(), Comparable { public operator fun rem(other: Short): Int /** * 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. */ @SinceKotlin("1.1") @@ -186,7 +186,7 @@ public class Byte private constructor() : Number(), Comparable { public operator fun rem(other: Int): Int /** * 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. */ @SinceKotlin("1.1") @@ -194,7 +194,7 @@ public class Byte private constructor() : Number(), Comparable { public operator fun rem(other: Long): Long /** * 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. */ @SinceKotlin("1.1") @@ -202,7 +202,7 @@ public class Byte private constructor() : Number(), Comparable { public operator fun rem(other: Float): Float /** * 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. */ @SinceKotlin("1.1") @@ -497,7 +497,7 @@ public class Short private constructor() : Number(), Comparable { /** * 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. */ @SinceKotlin("1.1") @@ -505,7 +505,7 @@ public class Short private constructor() : Number(), Comparable { public operator fun rem(other: Byte): Int /** * 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. */ @SinceKotlin("1.1") @@ -513,7 +513,7 @@ public class Short private constructor() : Number(), Comparable { public operator fun rem(other: Short): Int /** * 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. */ @SinceKotlin("1.1") @@ -521,7 +521,7 @@ public class Short private constructor() : Number(), Comparable { public operator fun rem(other: Int): Int /** * 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. */ @SinceKotlin("1.1") @@ -529,7 +529,7 @@ public class Short private constructor() : Number(), Comparable { public operator fun rem(other: Long): Long /** * 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. */ @SinceKotlin("1.1") @@ -537,7 +537,7 @@ public class Short private constructor() : Number(), Comparable { public operator fun rem(other: Float): Float /** * 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. */ @SinceKotlin("1.1") @@ -830,7 +830,7 @@ public class Int private constructor() : Number(), Comparable { /** * 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. */ @SinceKotlin("1.1") @@ -838,7 +838,7 @@ public class Int private constructor() : Number(), Comparable { public operator fun rem(other: Byte): Int /** * 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. */ @SinceKotlin("1.1") @@ -846,7 +846,7 @@ public class Int private constructor() : Number(), Comparable { public operator fun rem(other: Short): Int /** * 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. */ @SinceKotlin("1.1") @@ -854,7 +854,7 @@ public class Int private constructor() : Number(), Comparable { public operator fun rem(other: Int): Int /** * 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. */ @SinceKotlin("1.1") @@ -862,7 +862,7 @@ public class Int private constructor() : Number(), Comparable { public operator fun rem(other: Long): Long /** * 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. */ @SinceKotlin("1.1") @@ -870,7 +870,7 @@ public class Int private constructor() : Number(), Comparable { public operator fun rem(other: Float): Float /** * 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. */ @SinceKotlin("1.1") @@ -1205,7 +1205,7 @@ public class Long private constructor() : Number(), Comparable { /** * 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. */ @SinceKotlin("1.1") @@ -1213,7 +1213,7 @@ public class Long private constructor() : Number(), Comparable { public operator fun rem(other: Byte): Long /** * 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. */ @SinceKotlin("1.1") @@ -1221,7 +1221,7 @@ public class Long private constructor() : Number(), Comparable { public operator fun rem(other: Short): Long /** * 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. */ @SinceKotlin("1.1") @@ -1229,7 +1229,7 @@ public class Long private constructor() : Number(), Comparable { public operator fun rem(other: Int): Long /** * 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. */ @SinceKotlin("1.1") @@ -1237,7 +1237,7 @@ public class Long private constructor() : Number(), Comparable { public operator fun rem(other: Long): Long /** * 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. */ @SinceKotlin("1.1") @@ -1245,7 +1245,7 @@ public class Long private constructor() : Number(), Comparable { public operator fun rem(other: Float): Float /** * 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. */ @SinceKotlin("1.1") @@ -1599,7 +1599,7 @@ public class Float private constructor() : Number(), Comparable { /** * 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. */ @SinceKotlin("1.1") @@ -1607,7 +1607,7 @@ public class Float private constructor() : Number(), Comparable { public operator fun rem(other: Byte): Float /** * 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. */ @SinceKotlin("1.1") @@ -1615,7 +1615,7 @@ public class Float private constructor() : Number(), Comparable { public operator fun rem(other: Short): Float /** * 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. */ @SinceKotlin("1.1") @@ -1623,7 +1623,7 @@ public class Float private constructor() : Number(), Comparable { public operator fun rem(other: Int): Float /** * 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. */ @SinceKotlin("1.1") @@ -1631,7 +1631,7 @@ public class Float private constructor() : Number(), Comparable { public operator fun rem(other: Long): Float /** * 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. */ @SinceKotlin("1.1") @@ -1639,7 +1639,7 @@ public class Float private constructor() : Number(), Comparable { public operator fun rem(other: Float): Float /** * 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. */ @SinceKotlin("1.1") @@ -1901,7 +1901,7 @@ public class Double private constructor() : Number(), Comparable { /** * 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. */ @SinceKotlin("1.1") @@ -1909,7 +1909,7 @@ public class Double private constructor() : Number(), Comparable { public operator fun rem(other: Byte): Double /** * 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. */ @SinceKotlin("1.1") @@ -1917,7 +1917,7 @@ public class Double private constructor() : Number(), Comparable { public operator fun rem(other: Short): Double /** * 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. */ @SinceKotlin("1.1") @@ -1925,7 +1925,7 @@ public class Double private constructor() : Number(), Comparable { public operator fun rem(other: Int): Double /** * 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. */ @SinceKotlin("1.1") @@ -1933,7 +1933,7 @@ public class Double private constructor() : Number(), Comparable { public operator fun rem(other: Long): Double /** * 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. */ @SinceKotlin("1.1") @@ -1941,7 +1941,7 @@ public class Double private constructor() : Number(), Comparable { public operator fun rem(other: Float): Double /** * 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. */ @SinceKotlin("1.1") diff --git a/generators/builtins/common.kt b/generators/builtins/common.kt index 12f8725d78d..bf4569d8cd4 100644 --- a/generators/builtins/common.kt +++ b/generators/builtins/common.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -74,7 +74,7 @@ fun PrintWriter.printDoc(documentation: String, indent: String) { this.println("$indent/** $documentation */") } else { this.println("$indent/**") - docLines.forEach { this.println("$indent * $it") } + docLines.forEach { this.println("$indent * $it".trimEnd()) } this.println("$indent */") } } diff --git a/libraries/stdlib/src/kotlin/util/FloorDivMod.kt b/libraries/stdlib/src/kotlin/util/FloorDivMod.kt index ab6753957fe..eb6834b2861 100644 --- a/libraries/stdlib/src/kotlin/util/FloorDivMod.kt +++ b/libraries/stdlib/src/kotlin/util/FloorDivMod.kt @@ -20,7 +20,7 @@ public inline fun Byte.floorDiv(other: Byte): Int = /** * 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. */ @SinceKotlin("1.5") @@ -38,7 +38,7 @@ public inline fun Byte.floorDiv(other: Short): Int = /** * 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. */ @SinceKotlin("1.5") @@ -56,7 +56,7 @@ public inline fun Byte.floorDiv(other: Int): Int = /** * 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. */ @SinceKotlin("1.5") @@ -74,7 +74,7 @@ public inline fun Byte.floorDiv(other: Long): Long = /** * 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. */ @SinceKotlin("1.5") @@ -92,7 +92,7 @@ public inline fun Short.floorDiv(other: Byte): Int = /** * 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. */ @SinceKotlin("1.5") @@ -110,7 +110,7 @@ public inline fun Short.floorDiv(other: Short): Int = /** * 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. */ @SinceKotlin("1.5") @@ -128,7 +128,7 @@ public inline fun Short.floorDiv(other: Int): Int = /** * 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. */ @SinceKotlin("1.5") @@ -146,7 +146,7 @@ public inline fun Short.floorDiv(other: Long): Long = /** * 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. */ @SinceKotlin("1.5") @@ -164,7 +164,7 @@ public inline fun Int.floorDiv(other: Byte): Int = /** * 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. */ @SinceKotlin("1.5") @@ -182,7 +182,7 @@ public inline fun Int.floorDiv(other: Short): Int = /** * 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. */ @SinceKotlin("1.5") @@ -203,7 +203,7 @@ public inline fun Int.floorDiv(other: Int): Int { /** * 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. */ @SinceKotlin("1.5") @@ -223,7 +223,7 @@ public inline fun Int.floorDiv(other: Long): Long = /** * 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. */ @SinceKotlin("1.5") @@ -241,7 +241,7 @@ public inline fun Long.floorDiv(other: Byte): Long = /** * 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. */ @SinceKotlin("1.5") @@ -259,7 +259,7 @@ public inline fun Long.floorDiv(other: Short): Long = /** * 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. */ @SinceKotlin("1.5") @@ -277,7 +277,7 @@ public inline fun Long.floorDiv(other: Int): Long = /** * 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. */ @SinceKotlin("1.5") @@ -298,7 +298,7 @@ public inline fun Long.floorDiv(other: Long): Long { /** * 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. */ @SinceKotlin("1.5") @@ -311,9 +311,9 @@ public inline fun Long.mod(other: Long): Long { /** * 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. - * + * * If the result cannot be represented exactly, it is rounded to the nearest representable number. In this case the absolute value of the result can be less than or _equal to_ the absolute value of the divisor. */ @SinceKotlin("1.5") @@ -326,9 +326,9 @@ public inline fun Float.mod(other: Float): Float { /** * 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. - * + * * If the result cannot be represented exactly, it is rounded to the nearest representable number. In this case the absolute value of the result can be less than or _equal to_ the absolute value of the divisor. */ @SinceKotlin("1.5") @@ -339,9 +339,9 @@ public inline fun Float.mod(other: Double): Double = /** * 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. - * + * * If the result cannot be represented exactly, it is rounded to the nearest representable number. In this case the absolute value of the result can be less than or _equal to_ the absolute value of the divisor. */ @SinceKotlin("1.5") @@ -352,9 +352,9 @@ public inline fun Double.mod(other: Float): Double = /** * 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. - * + * * If the result cannot be represented exactly, it is rounded to the nearest representable number. In this case the absolute value of the result can be less than or _equal to_ the absolute value of the divisor. */ @SinceKotlin("1.5") diff --git a/libraries/stdlib/unsigned/src/kotlin/UByte.kt b/libraries/stdlib/unsigned/src/kotlin/UByte.kt index ca2071456a3..38b9ca2a118 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UByte.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UByte.kt @@ -124,28 +124,28 @@ public value class UByte @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UByte): UInt = this.toUInt().rem(other.toUInt()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UShort): UInt = this.toUInt().rem(other.toUInt()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UInt): UInt = this.toUInt().rem(other) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly @@ -153,28 +153,28 @@ public value class UByte @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UByte): UInt = this.toUInt().floorDiv(other.toUInt()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UShort): UInt = this.toUInt().floorDiv(other.toUInt()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UInt): UInt = this.toUInt().floorDiv(other) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly @@ -182,36 +182,36 @@ public value class UByte @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UByte): UByte = this.toUInt().mod(other.toUInt()).toUByte() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UShort): UShort = this.toUInt().mod(other.toUInt()).toUShort() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UInt): UInt = this.toUInt().mod(other) /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly diff --git a/libraries/stdlib/unsigned/src/kotlin/UInt.kt b/libraries/stdlib/unsigned/src/kotlin/UInt.kt index 58940c975d9..28066ce8f42 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UInt.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UInt.kt @@ -124,28 +124,28 @@ public value class UInt @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UByte): UInt = this.rem(other.toUInt()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UShort): UInt = this.rem(other.toUInt()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UInt): UInt = uintRemainder(this, other) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly @@ -153,28 +153,28 @@ public value class UInt @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UByte): UInt = this.floorDiv(other.toUInt()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UShort): UInt = this.floorDiv(other.toUInt()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UInt): UInt = div(other) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly @@ -182,36 +182,36 @@ public value class UInt @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UByte): UByte = this.mod(other.toUInt()).toUByte() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UShort): UShort = this.mod(other.toUInt()).toUShort() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UInt): UInt = rem(other) /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly diff --git a/libraries/stdlib/unsigned/src/kotlin/ULong.kt b/libraries/stdlib/unsigned/src/kotlin/ULong.kt index 965863cc172..309b476f501 100644 --- a/libraries/stdlib/unsigned/src/kotlin/ULong.kt +++ b/libraries/stdlib/unsigned/src/kotlin/ULong.kt @@ -124,28 +124,28 @@ public value class ULong @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UByte): ULong = this.rem(other.toULong()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UShort): ULong = this.rem(other.toULong()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UInt): ULong = this.rem(other.toULong()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly @@ -153,28 +153,28 @@ public value class ULong @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UByte): ULong = this.floorDiv(other.toULong()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UShort): ULong = this.floorDiv(other.toULong()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UInt): ULong = this.floorDiv(other.toULong()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly @@ -182,36 +182,36 @@ public value class ULong @kotlin.internal.IntrinsicConstEvaluation @PublishedApi /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UByte): UByte = this.mod(other.toULong()).toUByte() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UShort): UShort = this.mod(other.toULong()).toUShort() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UInt): UInt = this.mod(other.toULong()).toUInt() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly diff --git a/libraries/stdlib/unsigned/src/kotlin/UShort.kt b/libraries/stdlib/unsigned/src/kotlin/UShort.kt index 94bee2c1f40..bb4a139a1e7 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UShort.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UShort.kt @@ -124,28 +124,28 @@ public value class UShort @kotlin.internal.IntrinsicConstEvaluation @PublishedAp /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UByte): UInt = this.toUInt().rem(other.toUInt()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UShort): UInt = this.toUInt().rem(other.toUInt()) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly public inline operator fun rem(other: UInt): UInt = this.toUInt().rem(other) /** * Calculates the remainder of truncating division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. */ @kotlin.internal.InlineOnly @@ -153,28 +153,28 @@ public value class UShort @kotlin.internal.IntrinsicConstEvaluation @PublishedAp /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UByte): UInt = this.toUInt().floorDiv(other.toUInt()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UShort): UInt = this.toUInt().floorDiv(other.toUInt()) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun floorDiv(other: UInt): UInt = this.toUInt().floorDiv(other) /** * Divides this value by the other value, flooring the result to an integer that is closer to negative infinity. - * + * * For unsigned types, the results of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly @@ -182,36 +182,36 @@ public value class UShort @kotlin.internal.IntrinsicConstEvaluation @PublishedAp /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UByte): UByte = this.toUInt().mod(other.toUInt()).toUByte() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UShort): UShort = this.toUInt().mod(other.toUInt()).toUShort() /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly public inline fun mod(other: UInt): UInt = this.toUInt().mod(other) /** * Calculates the remainder of flooring division of this value (dividend) by the other value (divisor). - * + * * The result is always less than the divisor. - * + * * For unsigned types, the remainders of flooring division and truncating division are the same. */ @kotlin.internal.InlineOnly