Skip to content
On this page

Index

func Avg

go
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

go
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

go
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

Generated by gomarkdoc