math

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max[T Number](v1, v2 T) T

func Min

func Min[T Number](v1, v2 T) T

func SliceAvg

func SliceAvg[T Number](v ...T) float64

func SliceMax

func SliceMax[T Number](v ...T) T

func SliceMin

func SliceMin[T Number](v ...T) T

func SliceSum

func SliceSum[T Number](v ...T) T

SliceSum careful: sum might overflow

Types

type Number

type Number interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 |
		~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~float32 | ~float64 //| ~string
}

Jump to

Keyboard shortcuts

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