zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / java.math.BigDecimal / toUsd

toUsd

fun BigDecimal?.toUsd(decimals: Int = USD_FORMATTER.maximumFractionDigits): BigDecimal

Format a BigDecimal USD value as a BigDecimal USD value, right-padded to the given number of fraction digits. Start with USD -> End with USD.

Parameters

decimals - the scale to use for the resulting BigDecimal.

Return
this BigDecimal USD value converted into USD, with proper rounding and precision.