round

fun Double.round(places: Int): Double

Rounds a Double value to a specified number of decimal places.

Return

The rounded Double value.

Parameters

places

The number of decimal places to round to.