github.com/songzhibin97/go-baseutils@v0.0.2-0.20240302024150-487d8ce9c082/base/bmath/min.go (about) 1 package bmath 2 3 import "github.com/songzhibin97/go-baseutils/base/btype" 4 5 func Min[T btype.Ordered](a, b T) T { 6 if a > b { 7 return b 8 } 9 return a 10 }