Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[T constraints.Signed | constraints.Float](num T) T
func Round ¶
func Round[T constraints.Float](val T, precision uint) T
func RoundEven ¶
func RoundEven[T constraints.Integer | constraints.Float](val T) T
func SliceAvgMinMax ¶
func SliceAvgMinMax[T constraints.Float | constraints.Integer](s []T) (T, T, T)
Calculates the avg from an slice of floats or integers. Does not calculate a total sum to avoid an overflow. This often causes integers to be off by one compared to summing all elements and dividing by length.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.