Adding dep files and dependencies.

This commit is contained in:
Renan DelValle 2018-09-30 18:02:42 -07:00
parent 45f9efa578
commit b341c0a0e4
No known key found for this signature in database
GPG key ID: 3895800E03F17676
539 changed files with 313111 additions and 0 deletions

24
vendor/github.com/montanaflynn/stats/max.go generated vendored Normal file
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
}