round

fun Double.round(decimals: Int = 2): String(source)

Formats a Double with decimals decimal places. Example: 3.14159.round(2) → "3.14"