Skip to content

andy2046/maths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maths

makes Max Min easier

Go math pkg provides Max Min only for float64, this lib adds on for other types.

Why does Go not have feature X?

Install

go get github.com/andy2046/maths

Usage

func main() {
    iSlice := []int{1, 2, 3}
    i := IntVar.Max(iSlice...) // 3
    i = IntVar.Min(iSlice...) // 1
}