Update beorn7/perks to Fix off-by-one error for small sample sizes

Change-Id: I444b345743251a13252321df0f385503a4271234
This commit is contained in:
Davanum Srinivas
2019-05-10 08:15:22 -04:00
parent bf79c7c7ee
commit 56abfb5b01
22 changed files with 29 additions and 29 deletions

View File

@@ -133,7 +133,7 @@ func (s *Stream) Query(q float64) float64 {
if l == 0 {
return 0
}
i := int(float64(l) * q)
i := int(math.Ceil(float64(l) * q))
if i > 0 {
i -= 1
}