Peter
02/08/2022, 12:35 PMimport java.math.BigDecimal
val x = BigDecimal("127.0")
val y = BigDecimal("50")
println(x / y) // 2.5 unexpected
println(x.divide(y)) // 2.54 what I expected
Took me while to figure out why what was going on in my code and I cannot see many cases where this is the desired behaviour. Would rather have the div operator just calling the divide method.altavir
02/08/2022, 12:49 PMPeter
02/08/2022, 1:06 PMRyan
02/09/2022, 12:40 PMRyan
02/09/2022, 12:40 PM