toBigDecimal
Returns the value of this Int number as a BigDecimal.
Since Kotlin
1.2Returns the value of this Int number as a BigDecimal.
Since Kotlin
1.2Parameters
specifies the precision and the rounding mode.
Returns the value of this Long number as a BigDecimal.
Since Kotlin
1.2Returns the value of this Long number as a BigDecimal.
Since Kotlin
1.2Parameters
specifies the precision and the rounding mode.
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.
Since Kotlin
1.2Returns 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.
Since Kotlin
1.2Parameters
specifies the precision and the rounding mode.
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.
Since Kotlin
1.2Returns 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.
Since Kotlin
1.2Parameters
specifies the precision and the rounding mode.
Returns the value of this BigInteger number as a BigDecimal.
Since Kotlin
1.2Returns the value of this BigInteger number as a BigDecimal scaled according to the specified scale and rounded according to the settings specified with mathContext.
Since Kotlin
1.2Parameters
the scale of the resulting BigDecimal, i.e. number of decimal places of the fractional part. By default 0.