toBigDecimal

JVM
1.2
fun Int.toBigDecimal(): BigDecimal
(source)

Returns the value of this Int number as a BigDecimal.

JVM
1.2
fun Int.toBigDecimal(mathContext: MathContext): BigDecimal
(source)

Returns the value of this Int number as a BigDecimal.

Parameters

mathContext - specifies the precision and the rounding mode.

JVM
1.2
fun Long.toBigDecimal(): BigDecimal
(source)

Returns the value of this Long number as a BigDecimal.

JVM
1.2
fun Long.toBigDecimal(mathContext: MathContext): BigDecimal
(source)

Returns the value of this Long number as a BigDecimal.

Parameters

mathContext - specifies the precision and the rounding mode.

JVM
1.2
fun Float.toBigDecimal(): BigDecimal
(source)

Returns the value of this Float number as a BigDecimal.

The number is converted to a string and then the string is converted to a BigDecimal.

JVM
1.2
fun Float.toBigDecimal(mathContext: MathContext): BigDecimal
(source)

Returns the value of this Float number as a BigDecimal.

The number is converted to a string and then the string is converted to a BigDecimal.

Parameters

mathContext - specifies the precision and the rounding mode.

JVM
1.2
fun Double.toBigDecimal(): BigDecimal
(source)

Returns the value of this Double number as a BigDecimal.

The number is converted to a string and then the string is converted to a BigDecimal.

JVM
1.2
fun Double.toBigDecimal(mathContext: MathContext): BigDecimal
(source)

Returns the value of this Double number as a BigDecimal.

The number is converted to a string and then the string is converted to a BigDecimal.

Parameters

mathContext - specifies the precision and the rounding mode.