Documentation ¶
Overview ¶
Package number contains generic functions primarily for use with numbers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Max ¶
func Max[N constraints.Ordered](nums ...N) (n N)
Max returns the maximum in a list of numbers
func Min ¶
func Min[N constraints.Ordered](nums ...N) (n N)
Min returns the minimum in a list of numbers
func Sum ¶
func Sum[N constraints.Ordered](nums ...N) (n N)
Sum returns the sum of a list of numbers
Types ¶
type Number ¶
type Number interface { constraints.Integer | constraints.Float }
Number is any number type
Click to show internal directories.
Click to hide internal directories.