github.com/koko1123/flow-go-1@v0.29.6/utils/math/math.go (about)

     1  package math
     2  
     3  // MinUint returns the minimum of a list of uints.
     4  func MinUint(uints ...uint) uint {
     5  	if len(uints) == 0 {
     6  		return 0
     7  	}
     8  
     9  	min := uints[0]
    10  	for _, u := range uints {
    11  		if u < min {
    12  			min = u
    13  		}
    14  	}
    15  	return min
    16  }