Commit 926200a1 authored by Thomas White's avatar Thomas White
Browse files

i0_analysis: Use "floor" instead of "int"

parent 997b02db
......@@ -2,6 +2,7 @@
use strict;
use File::Basename;
use POSIX;
open(FH, $ARGV[0]);
......@@ -33,7 +34,7 @@ while ( $line = <FH> ) {
if ( $line =~ /^([\d\.]+)\ ([\d\.]+)$/ ) {
my $scale = $1;
my $i0 = $2;
my $bin = int(($scale-$hmin)/$hstep);
my $bin = floor(($scale-$hmin)/$hstep);
$hist[$bin]++;
}
}
......@@ -59,7 +60,7 @@ while ( $line = <FH> ) {
if ( $line =~ /^([\d\.]+)\ ([\d\.]+)$/ ) {
my $scale = $1;
my $i0 = $2;
my $bin = int(($i0-$hmin)/$hstep);
my $bin = floor(($i0-$hmin)/$hstep);
$hist[$bin]++;
}
}
......@@ -85,7 +86,7 @@ while ( $line = <FH> ) {
if ( $line =~ /^([\d\.]+)\ ([\d\.]+)$/ ) {
my $scale = $1;
my $i0 = $2;
my $bin = int((($scale/$i0)-$hmin)/$hstep);
my $bin = floor((($scale/$i0)-$hmin)/$hstep);
$hist[$bin]++;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment