percentile returns always an integer

This commit is contained in:
Christophe Robillard 2021-06-16 13:20:06 +02:00
parent 8cbbae8984
commit 55efe367bf

View file

@ -17,7 +17,7 @@ class Array
values = self.sort values = self.sort
if values.empty? if values.empty?
return [] return 0
elsif values.size == 1 elsif values.size == 1
return values.first return values.first
elsif p == 100 elsif p == 100