项目作者: andy2046

项目描述 :
Max Min for alphanumeric in Go
高级语言: Go
项目地址: git://github.com/andy2046/maths.git
创建时间: 2018-10-06T06:26:27Z
项目社区:https://github.com/andy2046/maths

开源协议:Apache License 2.0

下载


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

  1. go get github.com/andy2046/maths

Usage

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