Add operator 'rem' as extension to BigDecimal

Deprecate 'mod' operator
This commit is contained in:
Mikhail Zarechenskiy
2016-12-13 21:33:44 +03:00
parent 5a829809d9
commit c15c00677e
2 changed files with 9 additions and 0 deletions
@@ -76,8 +76,15 @@ public inline operator fun BigDecimal.div(other: BigDecimal) : BigDecimal = this
* Enables the use of the `%` operator for [BigDecimal] instances.
*/
@kotlin.internal.InlineOnly
@Deprecated("Use rem(other) instead", ReplaceWith("rem(other)"), DeprecationLevel.WARNING)
public inline operator fun BigDecimal.mod(other: BigDecimal) : BigDecimal = this.remainder(other)
/**
* Enables the use of the `%` operator for [BigDecimal] instances.
*/
@kotlin.internal.InlineOnly
public inline operator fun BigDecimal.rem(other: BigDecimal) : BigDecimal = this.remainder(other)
/**
* Enables the use of the unary `-` operator for [BigDecimal] instances.
*/