Forgot 5% for floats

This commit is contained in:
Jakob Borg 2014-06-16 16:55:23 +02:00
parent d71a782179
commit ec85c9fdfe

View File

@ -235,7 +235,7 @@ func statsForInts(data []int) map[string]int {
func statsForFloats(data []float64) map[string]float64 {
sort.Float64s(data)
res := make(map[string]float64, 4)
res["min"] = data[0]
res["fp"] = data[int(float64(len(data))*0.05)]
res["med"] = data[len(data)/2]
res["nfp"] = data[int(float64(len(data))*0.95)]
res["max"] = data[len(data)-1]