Skip to content

Commit

Permalink
Update divCeil
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisngyn committed Dec 17, 2024
1 parent 4f06af1 commit 68572b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/source/limitorder/pool_simulator_calc_amount_in.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (p *PoolSimulator) calcMakerAssetAmountBeforeFee(order *order, makingAmount

func divCeil(a, b *big.Int) *big.Int {
// (a + b - 1) / b
a = new(big.Int).Add(a, b)
a = new(big.Int).Sub(a, big.NewInt(1))
a.Add(a, b)
a.Sub(a, big.NewInt(1))
return a.Div(a, b)
}

0 comments on commit 68572b4

Please sign in to comment.