Sycnhronize docs of primitives in JS-IR, Wasm, Native sources

This commit is contained in:
Ilya Gorbunov
2022-09-30 14:39:04 +02:00
committed by Space Team
parent 34de2d9155
commit 607f15b55b
4 changed files with 251 additions and 123 deletions
@@ -158,42 +158,42 @@ public final class Byte private constructor() : Number(), Comparable<Byte> {
this.toDouble() / other this.toDouble() / other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Byte): Int = public inline operator fun rem(other: Byte): Int =
this.toInt() % other.toInt() this.toInt() % other.toInt()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Short): Int = public inline operator fun rem(other: Short): Int =
this.toInt() % other.toInt() this.toInt() % other.toInt()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Int): Int = public inline operator fun rem(other: Int): Int =
this.toInt() % other this.toInt() % other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Long): Long = public inline operator fun rem(other: Long): Long =
this.toLong() % other this.toLong() % other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** /**
* 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. * 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.
*/ */
@@ -501,42 +501,42 @@ public final class Short private constructor() : Number(), Comparable<Short> {
this.toDouble() / other this.toDouble() / other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Byte): Int = public inline operator fun rem(other: Byte): Int =
this.toInt() % other.toInt() this.toInt() % other.toInt()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Short): Int = public inline operator fun rem(other: Short): Int =
this.toInt() % other.toInt() this.toInt() % other.toInt()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Int): Int = public inline operator fun rem(other: Int): Int =
this.toInt() % other this.toInt() % other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Long): Long = public inline operator fun rem(other: Long): Long =
this.toLong() % other this.toLong() % other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** /**
* 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. * 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.
*/ */
@@ -839,42 +839,42 @@ public final class Int private constructor() : Number(), Comparable<Int> {
this.toDouble() / other this.toDouble() / other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Byte): Int = public inline operator fun rem(other: Byte): Int =
this % other.toInt() this % other.toInt()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Short): Int = public inline operator fun rem(other: Short): Int =
this % other.toInt() this % other.toInt()
/** /**
* 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. * 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.
*/ */
@TypedIntrinsic(IntrinsicType.SIGNED_REM) @TypedIntrinsic(IntrinsicType.SIGNED_REM)
external public operator fun rem(other: Int): Int external public operator fun rem(other: Int): Int
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Long): Long = public inline operator fun rem(other: Long): Long =
this.toLong() % other this.toLong() % other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** /**
* 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. * 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.
*/ */
@@ -1222,42 +1222,42 @@ public final class Long private constructor() : Number(), Comparable<Long> {
this.toDouble() / other this.toDouble() / other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Byte): Long = public inline operator fun rem(other: Byte): Long =
this % other.toLong() this % other.toLong()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Short): Long = public inline operator fun rem(other: Short): Long =
this % other.toLong() this % other.toLong()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Int): Long = public inline operator fun rem(other: Int): Long =
this % other.toLong() this % other.toLong()
/** /**
* 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. * 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.
*/ */
@TypedIntrinsic(IntrinsicType.SIGNED_REM) @TypedIntrinsic(IntrinsicType.SIGNED_REM)
external public operator fun rem(other: Long): Long external public operator fun rem(other: Long): Long
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** /**
* 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. * 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.
*/ */
@@ -1628,42 +1628,42 @@ public final class Float private constructor() : Number(), Comparable<Float> {
this.toDouble() / other this.toDouble() / other
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Byte): Float = public inline operator fun rem(other: Byte): Float =
this % other.toFloat() this % other.toFloat()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Short): Float = public inline operator fun rem(other: Short): Float =
this % other.toFloat() this % other.toFloat()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Int): Float = public inline operator fun rem(other: Int): Float =
this % other.toFloat() this % other.toFloat()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Long): Float = public inline operator fun rem(other: Long): Float =
this % other.toFloat() this % other.toFloat()
/** /**
* 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. * 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.
*/ */
@TypedIntrinsic(IntrinsicType.SIGNED_REM) @TypedIntrinsic(IntrinsicType.SIGNED_REM)
external public operator fun rem(other: Float): Float external public operator fun rem(other: Float): Float
/** /**
* 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. * 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.
*/ */
@@ -1936,42 +1936,42 @@ public final class Double private constructor() : Number(), Comparable<Double> {
external public operator fun div(other: Double): Double external public operator fun div(other: Double): Double
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Byte): Double = public inline operator fun rem(other: Byte): Double =
this % other.toDouble() this % other.toDouble()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Short): Double = public inline operator fun rem(other: Short): Double =
this % other.toDouble() this % other.toDouble()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Int): Double = public inline operator fun rem(other: Int): Double =
this % other.toDouble() this % other.toDouble()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Long): Double = public inline operator fun rem(other: Long): Double =
this % other.toDouble() this % other.toDouble()
/** /**
* 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. * 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.
*/ */
public inline operator fun rem(other: Float): Double = public inline operator fun rem(other: Float): Double =
this % other.toDouble() this % other.toDouble()
/** /**
* 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. * 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.
*/ */
+30 -30
View File
@@ -132,42 +132,42 @@ public class Byte private constructor() : Number(), Comparable<Byte> {
public operator fun div(other: Double): Double public operator fun div(other: Double): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Byte): Int public operator fun rem(other: Byte): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Short): Int public operator fun rem(other: Short): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Int): Int public operator fun rem(other: Int): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Long): Long public operator fun rem(other: Long): Long
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Float): Float public operator fun rem(other: Float): Float
/** /**
* 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. * 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.
*/ */
@@ -420,42 +420,42 @@ public class Short private constructor() : Number(), Comparable<Short> {
public operator fun div(other: Double): Double public operator fun div(other: Double): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Byte): Int public operator fun rem(other: Byte): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Short): Int public operator fun rem(other: Short): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Int): Int public operator fun rem(other: Int): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Long): Long public operator fun rem(other: Long): Long
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Float): Float public operator fun rem(other: Float): Float
/** /**
* 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. * 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.
*/ */
@@ -705,42 +705,42 @@ public class Int private constructor() : Number(), Comparable<Int> {
public operator fun div(other: Double): Double public operator fun div(other: Double): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Byte): Int public operator fun rem(other: Byte): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Short): Int public operator fun rem(other: Short): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Int): Int public operator fun rem(other: Int): Int
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Long): Long public operator fun rem(other: Long): Long
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Float): Float public operator fun rem(other: Float): Float
/** /**
* 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. * 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.
*/ */
@@ -1042,42 +1042,42 @@ public class Float private constructor() : Number(), Comparable<Float> {
public operator fun div(other: Double): Double public operator fun div(other: Double): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Byte): Float public operator fun rem(other: Byte): Float
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Short): Float public operator fun rem(other: Short): Float
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Int): Float public operator fun rem(other: Int): Float
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Long): Float public operator fun rem(other: Long): Float
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Float): Float public operator fun rem(other: Float): Float
/** /**
* 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. * 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.
*/ */
@@ -1298,42 +1298,42 @@ public class Double private constructor() : Number(), Comparable<Double> {
public operator fun div(other: Double): Double public operator fun div(other: Double): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Byte): Double public operator fun rem(other: Byte): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Short): Double public operator fun rem(other: Short): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Int): Double public operator fun rem(other: Int): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Long): Double public operator fun rem(other: Long): Double
/** /**
* 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. * 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") @SinceKotlin("1.1")
public operator fun rem(other: Float): Double public operator fun rem(other: Float): Double
/** /**
* 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. * 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.
*/ */
+6 -6
View File
@@ -154,7 +154,7 @@ public class Long internal constructor(
public inline operator fun div(other: Double): Double = toDouble() / other public inline operator fun div(other: Double): Double = toDouble() / other
/** /**
* 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. * 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.
*/ */
@@ -162,7 +162,7 @@ public class Long internal constructor(
public inline operator fun rem(other: Byte): Long = rem(other.toLong()) public inline operator fun rem(other: Byte): Long = rem(other.toLong())
/** /**
* 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. * 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.
*/ */
@@ -170,7 +170,7 @@ public class Long internal constructor(
public inline operator fun rem(other: Short): Long = rem(other.toLong()) public inline operator fun rem(other: Short): Long = rem(other.toLong())
/** /**
* 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. * 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.
*/ */
@@ -178,7 +178,7 @@ public class Long internal constructor(
public inline operator fun rem(other: Int): Long = rem(other.toLong()) public inline operator fun rem(other: Int): Long = rem(other.toLong())
/** /**
* 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. * 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.
*/ */
@@ -186,7 +186,7 @@ public class Long internal constructor(
public operator fun rem(other: Long): Long = modulo(other) public operator fun rem(other: Long): Long = modulo(other)
/** /**
* 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. * 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.
*/ */
@@ -194,7 +194,7 @@ public class Long internal constructor(
public inline operator fun rem(other: Float): Float = toFloat() % other public inline operator fun rem(other: Float): Float = toFloat() % other
/** /**
* 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. * 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.
*/ */
@@ -161,15 +161,15 @@ public class Byte private constructor(public val value: Byte) : Number(), Compar
public inline operator fun times(other: Double): Double = public inline operator fun times(other: Double): Double =
this.toDouble() * other this.toDouble() * other
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Byte): Int = public inline operator fun div(other: Byte): Int =
this.toInt() / other.toInt() this.toInt() / other.toInt()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Short): Int = public inline operator fun div(other: Short): Int =
this.toInt() / other.toInt() this.toInt() / other.toInt()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Int): Int = public inline operator fun div(other: Int): Int =
this.toInt() / other this.toInt() / other
@@ -197,15 +197,27 @@ public class Byte private constructor(public val value: Byte) : Number(), Compar
public inline operator fun rem(other: Int): Int = public inline operator fun rem(other: Int): Int =
this.toInt() % other this.toInt() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Long): Long = public inline operator fun rem(other: Long): Long =
this.toLong() % other this.toLong() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Double): Double = public inline operator fun rem(other: Double): Double =
this.toDouble() % other this.toDouble() % other
@@ -537,19 +549,19 @@ public class Short private constructor(public val value: Short) : Number(), Comp
public inline operator fun times(other: Double): Double = public inline operator fun times(other: Double): Double =
this.toDouble() * other this.toDouble() * other
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Byte): Int = public inline operator fun div(other: Byte): Int =
this.toInt() / other.toInt() this.toInt() / other.toInt()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Short): Int = public inline operator fun div(other: Short): Int =
this.toInt() / other.toInt() this.toInt() / other.toInt()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Int): Int = public inline operator fun div(other: Int): Int =
this.toInt() / other this.toInt() / other
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Long): Long = public inline operator fun div(other: Long): Long =
this.toLong() / other this.toLong() / other
@@ -561,27 +573,51 @@ public class Short private constructor(public val value: Short) : Number(), Comp
public inline operator fun div(other: Double): Double = public inline operator fun div(other: Double): Double =
this.toDouble() / other this.toDouble() / other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Byte): Int = public inline operator fun rem(other: Byte): Int =
this.toInt() % other.toInt() this.toInt() % other.toInt()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Short): Int = public inline operator fun rem(other: Short): Int =
this.toInt() % other.toInt() this.toInt() % other.toInt()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Int): Int = public inline operator fun rem(other: Int): Int =
this.toInt() % other this.toInt() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Long): Long = public inline operator fun rem(other: Long): Long =
this.toLong() % other this.toLong() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Double): Double = public inline operator fun rem(other: Double): Double =
this.toDouble() % other this.toDouble() % other
@@ -917,19 +953,19 @@ public class Int private constructor(val value: Int) : Number(), Comparable<Int>
public inline operator fun times(other: Double): Double = public inline operator fun times(other: Double): Double =
this.toDouble() * other this.toDouble() * other
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Byte): Int = public inline operator fun div(other: Byte): Int =
this / other.toInt() this / other.toInt()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Short): Int = public inline operator fun div(other: Short): Int =
this / other.toInt() this / other.toInt()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public operator fun div(other: Int): Int = public operator fun div(other: Int): Int =
if (this == Int.MIN_VALUE && other == -1) Int.MIN_VALUE else wasm_i32_div_s(this, other) if (this == Int.MIN_VALUE && other == -1) Int.MIN_VALUE else wasm_i32_div_s(this, other)
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Long): Long = public inline operator fun div(other: Long): Long =
this.toLong() / other this.toLong() / other
@@ -945,24 +981,44 @@ public class Int private constructor(val value: Int) : Number(), Comparable<Int>
public inline operator fun rem(other: Byte): Int = public inline operator fun rem(other: Byte): Int =
this % other.toInt() this % other.toInt()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Short): Int = public inline operator fun rem(other: Short): Int =
this % other.toInt() this % other.toInt()
/** Calculates the remainder of dividing 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.
*/
@WasmOp(WasmOp.I32_REM_S) @WasmOp(WasmOp.I32_REM_S)
public operator fun rem(other: Int): Int = public operator fun rem(other: Int): Int =
implementedAsIntrinsic implementedAsIntrinsic
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Long): Long = public inline operator fun rem(other: Long): Long =
this.toLong() % other this.toLong() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Double): Double = public inline operator fun rem(other: Double): Double =
this.toDouble() % other this.toDouble() % other
@@ -1346,19 +1402,19 @@ public class Long private constructor(val value: Long) : Number(), Comparable<Lo
public inline operator fun times(other: Double): Double = public inline operator fun times(other: Double): Double =
this.toDouble() * other this.toDouble() * other
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Byte): Long = public inline operator fun div(other: Byte): Long =
this / other.toLong() this / other.toLong()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Short): Long = public inline operator fun div(other: Short): Long =
this / other.toLong() this / other.toLong()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public inline operator fun div(other: Int): Long = public inline operator fun div(other: Int): Long =
this / other.toLong() this / other.toLong()
/** Divides this value by the other value. */ /** Divides this value by the other value, truncating the result to an integer that is closer to zero. */
public operator fun div(other: Long): Long = public operator fun div(other: Long): Long =
if (this == Long.MIN_VALUE && other == -1L) Long.MIN_VALUE else wasm_i64_div_s(this, other) if (this == Long.MIN_VALUE && other == -1L) Long.MIN_VALUE else wasm_i64_div_s(this, other)
@@ -1370,28 +1426,52 @@ public class Long private constructor(val value: Long) : Number(), Comparable<Lo
public inline operator fun div(other: Double): Double = public inline operator fun div(other: Double): Double =
this.toDouble() / other this.toDouble() / other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Byte): Long = public inline operator fun rem(other: Byte): Long =
this % other.toLong() this % other.toLong()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Short): Long = public inline operator fun rem(other: Short): Long =
this % other.toLong() this % other.toLong()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Int): Long = public inline operator fun rem(other: Int): Long =
this % other.toLong() this % other.toLong()
/** Calculates the remainder of dividing 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.
*/
@WasmOp(WasmOp.I64_REM_S) @WasmOp(WasmOp.I64_REM_S)
public operator fun rem(other: Long): Long = public operator fun rem(other: Long): Long =
implementedAsIntrinsic implementedAsIntrinsic
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Float): Float = public inline operator fun rem(other: Float): Float =
this.toFloat() % other this.toFloat() % other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Double): Double = public inline operator fun rem(other: Double): Double =
this.toDouble() % other this.toDouble() % other
@@ -1801,27 +1881,51 @@ public class Float private constructor(public val value: Float) : Number(), Comp
public inline operator fun div(other: Double): Double = public inline operator fun div(other: Double): Double =
this.toDouble() / other this.toDouble() / other
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Byte): Float = public inline operator fun rem(other: Byte): Float =
this % other.toFloat() this % other.toFloat()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Short): Float = public inline operator fun rem(other: Short): Float =
this % other.toFloat() this % other.toFloat()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Int): Float = public inline operator fun rem(other: Int): Float =
this % other.toFloat() this % other.toFloat()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Long): Float = public inline operator fun rem(other: Long): Float =
this % other.toFloat() this % other.toFloat()
/** Calculates the remainder of dividing 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.
*/
public operator fun rem(other: Float): Float = public operator fun rem(other: Float): Float =
this - (wasm_f32_nearest(this / other) * other) this - (wasm_f32_nearest(this / other) * other)
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Double): Double = public inline operator fun rem(other: Double): Double =
this.toDouble() % other this.toDouble() % other
@@ -1873,7 +1977,7 @@ public class Float private constructor(public val value: Float) : Number(), Comp
/** /**
* Converts this [Float] value to [Int]. * Converts this [Float] value to [Int].
* *
* The fractional part, if any, is rounded down. * The fractional part, if any, is rounded down towards zero.
* Returns zero if this `Float` value is `NaN`, [Int.MIN_VALUE] if it's less than `Int.MIN_VALUE`, * Returns zero if this `Float` value is `NaN`, [Int.MIN_VALUE] if it's less than `Int.MIN_VALUE`,
* [Int.MAX_VALUE] if it's bigger than `Int.MAX_VALUE`. * [Int.MAX_VALUE] if it's bigger than `Int.MAX_VALUE`.
*/ */
@@ -1884,7 +1988,7 @@ public class Float private constructor(public val value: Float) : Number(), Comp
/** /**
* Converts this [Float] value to [Long]. * Converts this [Float] 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 `Float` value is `NaN`, [Long.MIN_VALUE] if it's less than `Long.MIN_VALUE`, * Returns zero if this `Float` 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`. * [Long.MAX_VALUE] if it's bigger than `Long.MAX_VALUE`.
*/ */
@@ -2117,27 +2221,51 @@ public class Double private constructor(public val value: Double) : Number(), Co
public operator fun div(other: Double): Double = public operator fun div(other: Double): Double =
implementedAsIntrinsic implementedAsIntrinsic
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Byte): Double = public inline operator fun rem(other: Byte): Double =
this % other.toDouble() this % other.toDouble()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Short): Double = public inline operator fun rem(other: Short): Double =
this % other.toDouble() this % other.toDouble()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Int): Double = public inline operator fun rem(other: Int): Double =
this % other.toDouble() this % other.toDouble()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Long): Double = public inline operator fun rem(other: Long): Double =
this % other.toDouble() this % other.toDouble()
/** Calculates the remainder of dividing 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.
*/
public inline operator fun rem(other: Float): Double = public inline operator fun rem(other: Float): Double =
this % other.toDouble() this % other.toDouble()
/** Calculates the remainder of dividing 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.
*/
public operator fun rem(other: Double): Double = public operator fun rem(other: Double): Double =
this - (wasm_f64_nearest(this / other) * other) this - (wasm_f64_nearest(this / other) * other)
@@ -2190,7 +2318,7 @@ public class Double private constructor(public val value: Double) : Number(), Co
/** /**
* Converts this [Double] value to [Int]. * Converts this [Double] value to [Int].
* *
* 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`, [Int.MIN_VALUE] if it's less than `Int.MIN_VALUE`, * Returns zero if this `Double` value is `NaN`, [Int.MIN_VALUE] if it's less than `Int.MIN_VALUE`,
* [Int.MAX_VALUE] if it's bigger than `Int.MAX_VALUE`. * [Int.MAX_VALUE] if it's bigger than `Int.MAX_VALUE`.
*/ */
@@ -2201,7 +2329,7 @@ public class Double private constructor(public val value: Double) : Number(), Co
/** /**
* Converts this [Double] value to [Long]. * 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`, * 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`. * [Long.MAX_VALUE] if it's bigger than `Long.MAX_VALUE`.
*/ */