Fix for 1028710: floor() fails on floor(log(1000)/log(10))

This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-08-06 11:37:51 -03:00
parent f8c375a249
commit d77a3a19f6
6 changed files with 28 additions and 14 deletions

View File

@@ -811,7 +811,7 @@ sub distro_sparkline {
# Divide the range by 4 because there are 4 char codes: _.-^
$min = 0 if $min == $max;
my @range_min;
my $d = floor(($max-$min) / 4);
my $d = floor((($max+0.00001)-$min) / 4);
for my $x ( 1..4 ) {
push @range_min, $min + ($d * $x);
}