Fix average returning 1

This commit is contained in:
Anthony Dong 2017-05-24 16:24:59 +02:00 committed by GitHub
parent 7e53ec6bc7
commit fe2f80850a
1 changed files with 1 additions and 1 deletions

View File

@ -684,7 +684,7 @@ func average(n ...int64) int64 {
for _, i := range n {
if i >= 0 {
count++
total++
total += i
}
}
favg := float64(total) / float64(count)