Documentation
¶
Overview ¶
agg - a package with common aggragative operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Avg ¶
func Avg[T constraints.Integer | constraints.Float](vals ...T) T
Avg returns the average value of the given values.
Usage:
agg.Avg(1, 2, 3) // 2 agg.Avg([]float64{3.3, 6.6, 4.5}...) // 4.8
func Max ¶
func Max[T constraints.Ordered](vals ...T) T
Max returns the maximum value of the given values.
Usage:
agg.Max(1, 2, 3) // 3 agg.Max([]float64{2.3, 54.3, 3.5}...) // 54.3
func Min ¶
func Min[T constraints.Ordered](vals ...T) T
Min returns the minimum value of the given values.
Usage:
agg.Min(1, 2, 3) // 1 agg.Min([]float64{2.3, 54.3, 3.5}...) // 2.3
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.