升级流程引擎配置文件版本

This commit is contained in:
hoteas
2022-10-19 21:32:34 +08:00
parent cdba8af129
commit 78337c14ec
501 changed files with 157534 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package stats
import "math"
// Max finds the highest number in a slice
func Max(input Float64Data) (max float64, err error) {
// Return an error if there are no numbers
if input.Len() == 0 {
return math.NaN(), EmptyInput
}
// Get the first value as the starting point
max = input.Get(0)
// Loop and replace higher values
for i := 1; i < input.Len(); i++ {
if input.Get(i) > max {
max = input.Get(i)
}
}
return max, nil
}