Unit testing for def/ module.
Added unit tests to test code in def/ module.
This commit is contained in:
parent
e24b8a08c9
commit
bac60e872a
396 changed files with 83991 additions and 13209 deletions
6
vendor/github.com/montanaflynn/stats/max.go
generated
vendored
6
vendor/github.com/montanaflynn/stats/max.go
generated
vendored
|
@ -1,13 +1,15 @@
|
|||
package stats
|
||||
|
||||
import "math"
|
||||
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
|
||||
return math.NaN(), EmptyInputErr
|
||||
}
|
||||
|
||||
// Get the first value as the starting point
|
||||
|
|
Reference in a new issue