Skip to content

Commit ec5138d

Browse files
authored
fix(math): remove redundant allocations in MinInt and MaxInt
1 parent 9eb0138 commit ec5138d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

math/int.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@ func (i Int) Abs() Int {
406406

407407
// MinInt return the minimum of the ints
408408
func MinInt(i1, i2 Int) Int {
409-
return Int{min(i1.BigInt(), i2.BigInt())}
409+
return Int{min(i1.i, i2.i)}
410410
}
411411

412412
// MaxInt returns the maximum between two integers.
413413
func MaxInt(i, i2 Int) Int {
414-
return Int{max(i.BigInt(), i2.BigInt())}
414+
return Int{max(i.i, i2.i)}
415415
}
416416

417417
// String returns human-readable string

0 commit comments

Comments
 (0)