toBigDecimal

fun Long.toBigDecimal(exponentModifier: Long? = null, decimalMode: DecimalMode? = null): BigDecimal

Converts a number to big decimal, optionally modifies the exponent and provides decimal mode. Example: 1234L.toBigDecimal() produces 1.234E3 1234L.toBigDecimal(exponentModifier = 2) produces 1.234E5 (original exponent was 3 and modifier adds 2)


fun Int.toBigDecimal(exponentModifier: Long? = null, decimalMode: DecimalMode? = null): BigDecimal

Converts a number to big decimal, optionally modifies the exponent and provides decimal mode. Example: 1234.toBigDecimal() produces 1.234E3 1234.toBigDecimal(exponentModifier = 2) produces 1.234E5 (original exponent was 3 and modifier adds 2)


fun Short.toBigDecimal(exponentModifier: Long? = null, decimalMode: DecimalMode? = null): BigDecimal

Converts a number to big decimal, optionally modifies the exponent and provides decimal mode. Example: 123.toShort().toBigDecimal() produces 1.23E2 123.toShort().toBigDecimal(exponentModifier = 2) produces 1.23E4 (original exponent was 2 and modifier adds 2)


fun Byte.toBigDecimal(exponentModifier: Long? = null, decimalMode: DecimalMode? = null): BigDecimal

Converts a number to big decimal, optionally modifies the exponent and provides decimal mode. Example: 12.toByte().toBigDecimal() produces 1.2E1 12.toByte().toBigDecimal(exponentModifier = 2) produces 1.2E3 (original exponent was 1 and modifier adds 2)


fun String.toBigDecimal(exponentModifier: Long? = null, decimalMode: DecimalMode? = null): BigDecimal

Converts a number to big decimal, optionally modifies the exponent and provides decimal mode. Example: "1234".toBigDecimal() produces 1.234E3 "1234".toBigDecimal(exponentModifier = 2) produces 1.234E5 (original exponent was 3 and modifier adds 2)


fun Float.toBigDecimal(exponentModifier: Long? = null, decimalMode: DecimalMode? = null): BigDecimal

Converts a number to big decimal, optionally modifies the exponent and provides decimal mode. Example: 1234F.toBigDecimal() produces 1.234E3 1234F.toBigDecimal(exponentModifier = 2) produces 1.234E5 (original exponent was 3 and modifier adds 2)


fun Double.toBigDecimal(exponentModifier: Long? = null, decimalMode: DecimalMode? = null): BigDecimal

Converts a number to big decimal, optionally modifies the exponent and provides decimal mode. Example: 1234.0.toBigDecimal() produces 1.234E3 1234.0.toBigDecimal(exponentModifier = 2) produces 1.234E5 (original exponent was 3 and modifier adds 2)