fun Double?.toUsd(decimals: Int = USD_FORMATTER.maximumFractionDigits): BigDecimal
Format a Double USD value as a BigDecimal USD value, right-padded to the given number of fraction digits. Start with USD -> End with USD.
decimals
- the scale to use for the resulting BigDecimal.
Return
this Double USD value converted into a BigDecimal, with proper rounding and precision.