Updated on 2026-08-14
This commit is contained in:
parent
77a2899ac5
commit
404bcc011a
4 changed files with 10 additions and 5 deletions
|
|
@ -12,4 +12,7 @@ fun BigDecimal.isZero(): Boolean = this.compareTo(BigDecimal.ZERO) == 0
|
|||
fun BigDecimal.isPositive(): Boolean = this.signum() == 1
|
||||
|
||||
/** Removes trailing zeros and returns plain [String] */
|
||||
fun BigDecimal.stripZeroPlainString(): String = this.stripTrailingZeros().toPlainString()
|
||||
fun BigDecimal.stripZeroPlainString(): String = this.stripTrailingZeros().toPlainString()
|
||||
|
||||
/** Compares two [BigDecimal] numbers */
|
||||
infix fun BigDecimal.isEqualTo(other: BigDecimal): Boolean = this.compareTo(other) == 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue