github.com/go-playground/pkg/v5@v5.29.1/math/max_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  // Max returns the larger 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 Max[N constraintsext.Number](x, y N) N {
    15  	return max(x, y)
    16  }