19declare(strict_types=1);
34 private string $variable,
35 private string $range_min_txt,
36 private string $range_max_txt,
38 private int $precision = 0,
39 private int $intprecision = 1
56 $DIC[
'tpl']->setOnScreenMessage(
'failure',
$DIC[
'lng']->txt(
'err_divider_too_big'));
67 while ($calc_val < $rounded_range_min || $calc_val > $rounded_range_max) {
68 $rnd = random_int((
int) $r1, (
int) $r2);
91 return $int_precision !==
null && $int_precision <= max(abs($max_range), abs($min_range));
110 if (!is_object($this->
getUnit())) {
119 $this->precision = $precision;
124 return $this->precision;
129 $this->variable = $variable;
134 return $this->variable;
140 $math->suppress_errors =
true;
141 $this->range_min = (float) $math->evaluate(
$range_min);
152 $math->suppress_errors =
true;
153 $this->range_max = (float) $math->evaluate(
$range_max);
173 $this->intprecision = $intprecision;
178 return $this->intprecision;
183 $this->range_max_txt = $range_max_txt;
188 return $this->range_max_txt;
193 $this->range_min_txt = $range_min_txt;
198 return $this->range_min_txt;
static _sub($left_operand, $right_operand, int $scale=50)
static _pow($left_operand, $right_operand, int $scale=50)
static _add($left_operand, $right_operand, int $scale=50)
static _div($left_operand, $right_operand, int $scale=50)
static _mul($left_operand, $right_operand, int $scale=50)