mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 21:51:23 +08:00
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
|
|
}
|