CustomVariableNumber: add a hint for floats
This commit is contained in:
parent
2d826ba939
commit
190b3efb98
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue