diff --git a/library/Director/CustomVariable/CustomVariableNumber.php b/library/Director/CustomVariable/CustomVariableNumber.php index e04632ea..91a7b5a0 100644 --- a/library/Director/CustomVariable/CustomVariableNumber.php +++ b/library/Director/CustomVariable/CustomVariableNumber.php @@ -12,6 +12,15 @@ class CustomVariableNumber extends CustomVariable return false; } + // TODO: in case we encounter problems with floats we could + // consider something as follows, but taking more care + // about precision: + /* + if (is_float($this->value)) { + return sprintf($var->getValue(), '%.9F') + === sprintf($this->getValue(), '%.9F'); + } + */ return $var->getValue() === $this->getValue(); }