package mathext

import "github.com/go-playground/pkg/v5/math"

Index

Functions

func Max

func Max[N constraintsext.Number](x, y N) N

Max returns the larger value.

NOTE: this function does not check for difference in floats of 0/zero vs -0/negative zero using Signbit.

Deprecated: use the new std library `max` instead.

func Min

func Min[N constraintsext.Number](x, y N) N

Min returns the smaller value.

NOTE: this function does not check for difference in floats of 0/zero vs -0/negative zero using Signbit.

Deprecated: use the new std library `max` instead.

Source Files

max_go121.go min_go121.go

Version
v5.29.0
Published
Mar 27, 2024
Platform
darwin/amd64
Imports
1 packages
Last checked
49 minutes ago

Tools for package owners.