Adding dep files and dependencies.
This commit is contained in:
parent
45f9efa578
commit
b341c0a0e4
539 changed files with 313111 additions and 0 deletions
18
vendor/github.com/montanaflynn/stats/sum.go
generated
vendored
Normal file
18
vendor/github.com/montanaflynn/stats/sum.go
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
package stats
|
||||
|
||||
import "math"
|
||||
|
||||
// Sum adds all the numbers of a slice together
|
||||
func Sum(input Float64Data) (sum float64, err error) {
|
||||
|
||||
if input.Len() == 0 {
|
||||
return math.NaN(), EmptyInput
|
||||
}
|
||||
|
||||
// Add em up
|
||||
for _, n := range input {
|
||||
sum += n
|
||||
}
|
||||
|
||||
return sum, nil
|
||||
}
|
Reference in a new issue