SyntaxFix
Write A Post
Hire A Developer
Questions
How about :
val value = 1.4142135623730951 //3 decimal places println((value * 1000).round / 1000.toDouble) //4 decimal places println((value * 10000).round / 10000.toDouble)