format

open fun format(value: Double, decimalPlaces: Int = Int.MAX_VALUE): String(source)

Formats a value with this unit's symbol.

Return

A formatted string representation of the value with the unit symbol.

Parameters

value

The numeric value to format.

decimalPlaces

The number of decimal places to display.