roundToDecimalPlaces

fun Double.roundToDecimalPlaces(decimalPlaces: Int = 1): Double

Rounds the given number to the specified decimal place (the first by default). For additional info see RoundingMode#HALF_UP.

For example ``roundToNDecimalPlaces(1234.567,decimalPlaces=1)`` will return ``1234.6``.

@see https://stackoverflow.com/a/2808648/9140494 @return The rounded value


fun Float.roundToDecimalPlaces(decimalPlaces: Int = 1): Float