github.com/go-playground/pkg/v5@v5.29.1/math/min_go121.go (about)

     1  //go:build go1.21
     2  
     3  package mathext
     4  
     5  import (
     6  	constraintsext "github.com/go-playground/pkg/v5/constraints"
     7  )
     8  
     9  // Min returns the smaller value.
    10  //
    11  // NOTE: this function does not check for difference in floats of 0/zero vs -0/negative zero using Signbit.
    12  //
    13  // Deprecated: use the new std library `max` instead.
    14  func Min[N constraintsext.Number](x, y N) N {
    15  	return min(x, y)
    16  }