agg

package
v3.0.0-rc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL