mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-23 04:40:49 +01:00
Merge 192072cb5b
into 547861c49b
This commit is contained in:
commit
dfca6d5bf5
1 changed files with 1 additions and 3 deletions
|
@ -1387,9 +1387,7 @@ func (d Decimal) IntPart() int64 {
|
|||
// BigInt returns integer component of the decimal as a BigInt.
|
||||
func (d Decimal) BigInt() *big.Int {
|
||||
scaledD := d.rescale(0)
|
||||
i := &big.Int{}
|
||||
i.SetString(scaledD.String(), 10)
|
||||
return i
|
||||
return scaledD.value
|
||||
}
|
||||
|
||||
// BigFloat returns decimal as BigFloat.
|
||||
|
|
Loading…
Reference in a new issue