Add operator 'rem' as extension to BigInteger
#KT-14650 Fixed Note that after this change behaviour of '%' on BigInteger is changed, now it works like a proper remainder
This commit is contained in:
@@ -31,6 +31,13 @@ public inline operator fun BigInteger.times(other: BigInteger) : BigInteger = th
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun BigInteger.div(other: BigInteger) : BigInteger = this.divide(other)
|
||||
|
||||
/**
|
||||
* Enables the use of the `%` operator for [BigInteger] instances.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline operator fun BigInteger.rem(other: BigInteger) : BigInteger = this.remainder(other)
|
||||
|
||||
/**
|
||||
* Enables the use of the unary `-` operator for [BigInteger] instances.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user