Sycnhronize docs of primitives in JS-IR, Wasm, Native sources
This commit is contained in:
committed by
Space Team
parent
34de2d9155
commit
607f15b55b
@@ -132,42 +132,42 @@ public class Byte private constructor() : Number(), Comparable<Byte> {
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@@ -420,42 +420,42 @@ public class Short private constructor() : Number(), Comparable<Short> {
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@@ -705,42 +705,42 @@ public class Int private constructor() : Number(), Comparable<Int> {
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@@ -1042,42 +1042,42 @@ public class Float private constructor() : Number(), Comparable<Float> {
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@@ -1298,42 +1298,42 @@ public class Double private constructor() : Number(), Comparable<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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
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.
|
||||
*/
|
||||
|
||||
@@ -154,7 +154,7 @@ public class Long internal constructor(
|
||||
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.
|
||||
*/
|
||||
@@ -162,7 +162,7 @@ public class Long internal constructor(
|
||||
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.
|
||||
*/
|
||||
@@ -170,7 +170,7 @@ public class Long internal constructor(
|
||||
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.
|
||||
*/
|
||||
@@ -178,7 +178,7 @@ public class Long internal constructor(
|
||||
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.
|
||||
*/
|
||||
@@ -186,7 +186,7 @@ public class Long internal constructor(
|
||||
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.
|
||||
*/
|
||||
@@ -194,7 +194,7 @@ public class Long internal constructor(
|
||||
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.
|
||||
*/
|
||||
|
||||
@@ -161,15 +161,15 @@ public class Byte private constructor(public val value: Byte) : Number(), Compar
|
||||
public inline operator fun times(other: Double): Double =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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)
|
||||
public operator fun rem(other: Int): Int =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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)
|
||||
public operator fun rem(other: Long): Long =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
this.toDouble() % other
|
||||
|
||||
@@ -1873,7 +1977,7 @@ public class Float private constructor(public val value: Float) : Number(), Comp
|
||||
/**
|
||||
* 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`,
|
||||
* [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].
|
||||
*
|
||||
* 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`,
|
||||
* [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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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 =
|
||||
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].
|
||||
*
|
||||
* 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`,
|
||||
* [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].
|
||||
*
|
||||
* 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`,
|
||||
* [Long.MAX_VALUE] if it's bigger than `Long.MAX_VALUE`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user