IntPart returns the integer component of the decimal.
()
| 1411 | |
| 1412 | // IntPart returns the integer component of the decimal. |
| 1413 | func (d Decimal) IntPart() int64 { |
| 1414 | scaledD := d.rescale(0) |
| 1415 | return scaledD.value.Int64() |
| 1416 | } |
| 1417 | |
| 1418 | // BigInt returns integer component of the decimal as a BigInt. |
| 1419 | func (d Decimal) BigInt() *big.Int { |