func Arithmetic(val interface{}) float64
Arithmetic returns the arithmetic mean from a slice of Values as float64. The arithmetic mean or simply the mean or average when the context is clear, is the sum of a list of numbers divided by the number of numbers in the list. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
▹ Example
func Count(val interface{}) int
Count returns the length of any slice (like len()).
▹ Example
func Deg2Rad(deg float64) float64
Deg2Rad returns the rad of a deg.
func Even(number int) bool
Even tells if a number is even
func FloatRound(v float64, d int) float64
Round returns a rounded float64 from a float64 with d digits after the point. It rounds via "Round half away from zero".
func Geometric(val interface{}) float64
Geometric returns the geometric mean from a slice of Values as float64. The geometric mean is a type of mean or average, which indicates the central tendency or typical value of a set of numbers by using the product of their values (as opposed to the arithmetic mean which uses their sum). The geometric mean is defined as the nth root of the product of n numbers. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
▹ Example
func Harmonic(val interface{}) float64
Harmonic returns the harmonic mean from a slice of Values as float64. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
▹ Example
func Max(val interface{}) float64
Max returns the greatest number from a slice of Values as float64. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
▹ Example
func Mean(val interface{}, t Meantype) float64
▹ Example
func Median(val interface{}) float64
Median returns the median from a slice of Values as float64. The median is the numerical value separating the higher half of a data sample from the lower half. The median of a list of numbers can be found by arranging all the observations from lowest value to highest value and picking the middle one. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
▹ Example
func Min(val interface{}) float64
Min returns the smallest number from a slice of Values as float64. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
▹ Example
func Odd(number int) bool
Odd tells if a number is odd
func Prime(n int) int
Prime returns the nth prime number as int.
▹ Example
func Rad2Deg(rad float64) float64
Rad2Deg returns the deg of a rad.
func Rootmeansquare(val interface{}) float64
Rootmeansquare returns the root mean square from a slice of Values as float64. The root mean square is the root value of the sum of the squared value of a list of numbers divided by the number of numbers in the list. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
func Round(v float64) int
Round returns a rounded int from a float64. It rounds via "Round half away from zero".
func Sqrt(n int64) int64
Sqrt calculates the square root of n.
func Sum(val interface{}) float64
Sum returns the sum from a slice of Values as float64. It uses "as" (simonwaldherr.de/go/golibs/as) to convert given values to floats.
▹ Example
type Meantype int
const ( ArithmeticMean Meantype = iota GeometricMean HarmonicMean MedianMean RmsMean Default )