Clash.Meta/transport/tuic/congestion/minmax_go120.go
wwqgtxx 62266010ac Revert "migration: go 1.21"
This reverts commit 33d41338ef.
2023-09-21 08:29:28 +08:00

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
}