stats

package
v0.0.0-...-59689ed Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxFloat64s

func MaxFloat64s(values []float64) (float64, error)

MaxFloat64s return the maximal value in a slice of float64

Example
vals := []float64{23, 8, 4, 42, 16, 15}
fmt.Println(MaxFloat64s(vals))
fmt.Println(MaxFloat64s(nil))
Output:

42 <nil>
0 max of empty slice

func MaxInts

func MaxInts(values []int) (int, error)

MaxInts return the maximal value in a slice of int

Example
vals := []int{23, 8, 4, 42, 16, 15}
fmt.Println(MaxInts(vals))
fmt.Println(MaxInts(nil))
Output:

42 <nil>
0 max of empty slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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