divide

abstract fun divide(other: KBigDecimal, scale: Int): KBigDecimal

Returns a KBigDecimal that is the quotient of this divided by the specified value.

Return

The result of the division with the specified scale

Parameters

other

The divisor

scale

The number of digits to the right of the decimal point in the result

Throws

if other is zero


abstract fun divide(other: KBigDecimal, scale: Int, mode: Int): KBigDecimal

Returns a KBigDecimal that is the quotient of this divided by the specified value.

Return

The result of the division with the specified scale and rounding mode

Parameters

other

The divisor

scale

The number of digits to the right of the decimal point in the result

mode

The rounding mode to apply (see RoundingMode constants)

Throws

if other is zero or if rounding is necessary but the rounding mode is UNNECESSARY