can fill values now

This commit is contained in:
Will Charczuk 2017-02-28 17:55:48 -08:00
parent 9a9af15fd4
commit 114738a2de
6 changed files with 179 additions and 5 deletions

View file

@ -148,6 +148,14 @@ func (m mathUtil) AbsInt(value int) int {
return value
}
// AbsInt64 returns the absolute value of a long.
func (m mathUtil) AbsInt64(value int64) int64 {
if value < 0 {
return -value
}
return value
}
// Mean returns the mean of a set of values
func (m mathUtil) Mean(values ...float64) float64 {
return m.Sum(values...) / float64(len(values))