BigInt returns integer component of the decimal as a BigInt.
()
| 1417 | |
| 1418 | // BigInt returns integer component of the decimal as a BigInt. |
| 1419 | func (d Decimal) BigInt() *big.Int { |
| 1420 | scaledD := d.rescale(0) |
| 1421 | return scaledD.value |
| 1422 | } |
| 1423 | |
| 1424 | // BigFloat returns decimal as BigFloat. |
| 1425 | // Be aware that casting decimal to BigFloat might cause a loss of precision. |