This repository has been archived on 2024-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
2023-10-01 00:01:32 +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
}