sampler-fork/component/util/math.go

15 lines
142 B
Go
Raw Normal View History

2019-03-26 03:29:23 +00:00
package util
func Max(numbers []int) int {
max := numbers[0]
for _, n := range numbers {
if n > max {
max = n
}
}
return max
}