sing/common/minmax.go
2024-10-19 09:09:15 +08:00

15 lines
167 B
Go

//go:build go1.21
package common
import (
"cmp"
)
func Min[T cmp.Ordered](x, y T) T {
return min(x, y)
}
func Max[T cmp.Ordered](x, y T) T {
return max(x, y)
}