round bigdecimal, double in kotlin
import java.math.* | |
fun main() { | |
println("Hello, world!!!") | |
val myValue=-1.25 | |
val out = BigDecimal(myValue).setScale(1, RoundingMode.HALF_UP).toDouble(); | |
println("$out") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment