mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
Rename file to better differentiate from Lux-specific code as requested. All upgrade functions continue to return true for clean genesis setup.
28 lines
460 B
Go
28 lines
460 B
Go
// Copyright 2025 Lux Industries, Inc.
|
|
// This file contains math utility functions.
|
|
|
|
package ethapi
|
|
|
|
import (
|
|
"math"
|
|
"math/big"
|
|
)
|
|
|
|
// BigMax returns the larger of x or y.
|
|
func BigMax(x, y *big.Int) *big.Int {
|
|
if x.Cmp(y) > 0 {
|
|
return x
|
|
}
|
|
return y
|
|
}
|
|
|
|
// BigMin returns the smaller of x or y.
|
|
func BigMin(x, y *big.Int) *big.Int {
|
|
if x.Cmp(y) < 0 {
|
|
return x
|
|
}
|
|
return y
|
|
}
|
|
|
|
// MaxInt64 is the maximum value for an int64.
|
|
const MaxInt64 = math.MaxInt64 |