Change rounding to match the one from Java
This commit is contained in:
parent
9c3330cb6d
commit
e6fb8bfc52
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user