mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-22 12:30:49 +01:00
Compare commits
2 commits
7ddc70e1f5
...
aadc2cec61
Author | SHA1 | Date | |
---|---|---|---|
|
aadc2cec61 | ||
|
584bc5502b |
1 changed files with 1 additions and 4 deletions
|
@ -1088,10 +1088,7 @@ func (d Decimal) IntPart() int64 {
|
||||||
|
|
||||||
// BigInt returns integer component of the decimal as a BigInt.
|
// BigInt returns integer component of the decimal as a BigInt.
|
||||||
func (d Decimal) BigInt() *big.Int {
|
func (d Decimal) BigInt() *big.Int {
|
||||||
scaledD := d.rescale(0)
|
return new(big.Int).Set(d.value)
|
||||||
i := &big.Int{}
|
|
||||||
i.SetString(scaledD.String(), 10)
|
|
||||||
return i
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BigFloat returns decimal as BigFloat.
|
// BigFloat returns decimal as BigFloat.
|
||||||
|
|
Loading…
Reference in a new issue