github.com/songzhibin97/go-baseutils@v0.0.2-0.20240302024150-487d8ce9c082/base/bmath/max.go (about)

     1  package bmath
     2  
     3  import "github.com/songzhibin97/go-baseutils/base/btype"
     4  
     5  func Max[T btype.Ordered](a, b T) T {
     6  	if a > b {
     7  		return a
     8  	}
     9  	return b
    10  }