Comparing BigDecimals for Equality

Comparing BigDecimals for Equality


val bdy = 0.3.toBigDecimal()
val bdx = 0.3.toBigDecimal()
println(BigDecimal.ZERO.compareTo(bdy - bdx) == 0)