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.

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.

Source Files

max.go min.go

Version
v5.15.1
Published
Mar 7, 2023
Platform
darwin/amd64
Imports
2 packages
Last checked
53 minutes ago

Tools for package owners.