Documentation ¶
Overview ¶
Package mathx provides extensions and utilities to the math package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Max ¶
func Max[T constraints.Ordered](list ...T) T
Max returns the largest element in the list. If empty, returns the default value. Convenience function.
func MaxT ¶
MaxT returns the largest element in the list, using the given ordering. If empty, returns the default value of T.
func Min ¶
func Min[T constraints.Ordered](list ...T) T
Min returns the smallest element in the list. If empty, returns the default value. Convenience function.
func MinT ¶
MinT returns the smallest element in the list, using the given ordering. If empty, returns the default value of T.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.