zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / kotlin.Double / toZec

toZec

fun Double?.toZec(decimals: Int = ZEC_FORMATTER.maximumFractionDigits): BigDecimal

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

Parameters

decimals - the scale to use for the resulting BigDecimal.

Return
this Double ZEC value converted into a BigDecimal, with the proper rounding mode for use with other formatting functions.