Iman Tumorang
Iman Tumorang
Software Engineer - Blogger - Open Source Enthusiast - Startup Enthusiast
May 1, 2018 1 min read

Saint

Just a Simple Math Library with Integer Operations

Source code: github

Download

go get -u github.com/bxcodec/saint

Example

package main

import (
	"fmt"
	"github.com/bxcodec/saint"
)

func main() {


   arr:=[] int {2,1,3,5,6}
   var x int

   x= saint.Max(arr...)
   fmt.Println(x) // 6

   x= saint.Max(4,3,1,5,7)
   fmt.Println(x) // 7

   x= saint.Min(arr...)
   fmt.Println(x) // 1

   x= saint.Min(4,3,5,5,7)
   fmt.Println(x) // 3

   x= saint.Sum(arr...)
   fmt.Println(x) // 17

   x = saint.Sum(4,5)
   fmt.Println(x) // 9
}

comments powered by Disqus