升级流程引擎配置文件版本
This commit is contained in:
+18
@@ -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 New Issue
Block a user