mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-11 19:42:29 +08:00
62266010ac
This reverts commit 33d41338ef00ff20e444e03f3d9ee7b60fc787a4.
20 lines
244 B
Go
20 lines
244 B
Go
//go:build !go1.21
|
|
|
|
package congestion
|
|
|
|
import "golang.org/x/exp/constraints"
|
|
|
|
func Max[T constraints.Ordered](a, b T) T {
|
|
if a < b {
|
|
return b
|
|
}
|
|
return a
|
|
}
|
|
|
|
func Min[T constraints.Ordered](a, b T) T {
|
|
if a < b {
|
|
return a
|
|
}
|
|
return b
|
|
}
|