toLong

abstract fun toLong(): Long

Converts this BigDecimal to a long. This conversion is analogous to the narrowing primitive conversion from double to short as defined in The Java Language Specification: any fractional part of this BigDecimal will be discarded, and if the resulting "BigInteger" is too big to fit in a long, only the low-order 64 bits are returned. Note that this conversion can lose information about the overall magnitude and _precision of this BigDecimal value as well as return a result with the opposite sign.

Return

this BigDecimal converted to a long.