go-chart/matrix/util.go
Will Charczuk 88499d5576 updates
2017-04-17 10:27:24 -07:00

27 lines
347 B
Go

package matrix
import (
"math"
)
func minInt(values ...int) int {
min := math.MaxInt32
for x := 0; x < len(values); x++ {
if values[x] < min {
min = values[x]
}
}
return min
}
func maxInt(values ...int) int {
max := math.MinInt32
for x := 0; x < len(values); x++ {
if values[x] > max {
max = values[x]
}
}
return max
}