Removed ceiling argument passing, simply round up threshold now. Simplified test accordingly

This commit is contained in:
Frank Cizmich
2014-07-30 19:28:37 -03:00
parent d3044a1bec
commit b5a31ecbaa
4 changed files with 20 additions and 107 deletions

View File

@@ -51,7 +51,6 @@ sub new {
_check_and_set_vals(
vars => $max_val_for,
get_status => $args{get_status},
ceiling => $args{ceiling},
threshold_factor => 0.2, # +20%
);
}
@@ -224,7 +223,7 @@ sub _check_and_set_vals {
else {
PTDEBUG && _d('Initial', $var, 'value:', $init_val);
$val = ($init_val * $threshold_factor) + $init_val;
$vars->{$var} = $args{ceiling} ? int(ceil($val)) : int($val);
$vars->{$var} = int(ceil($val));
}
PTDEBUG && _d('Wait if', $var, '>=', $val);
}