Change rounding to match the one from Java

This commit is contained in:
Iaroslav Postovalov 2020-09-13 17:05:34 +07:00
parent 9c3330cb6d
commit e6fb8bfc52
No known key found for this signature in database
GPG Key ID: 70D5F4DCB0972F1B

View File

@ -25,7 +25,7 @@ abstract class BigDecimalFieldBase internal constructor(val mode: DecimalMode =
override fun BigDecimal.div(k: Number): BigDecimal = divide(number(k), mode) override fun BigDecimal.div(k: Number): BigDecimal = divide(number(k), mode)
companion object { companion object {
internal val DEFAULT_MODE = DecimalMode(16, RoundingMode.ROUND_HALF_AWAY_FROM_ZERO) internal val DEFAULT_MODE = DecimalMode(16, RoundingMode.ROUND_HALF_TOWARDS_ZERO)
} }
} }