Skip to content

Commit deecdff

Browse files
committed
Fix ratio -> int
Signed-off-by: James Hamlin <jfhamlin@gmail.com>
1 parent 1e1f3b4 commit deecdff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/lang/ratio.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ func (r *Ratio) Denominator() *big.Int {
3737
}
3838

3939
func (r *Ratio) BigIntegerValue() *big.Int {
40-
return new(big.Int).Div(r.val.Num(), r.val.Denom())
40+
var tmp big.Int
41+
res, _ := new(big.Int).QuoRem(r.val.Num(), r.val.Denom(), &tmp)
42+
return res
4143
}
4244

4345
func (r *Ratio) String() string {

0 commit comments

Comments
 (0)