mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Another str -> repr change affecting a float.
This commit is contained in:
parent
025f0f8440
commit
055663b79d
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ def reallyequal(actual, expected, tol):
|
|||
# Deal with floats (edge cases, tolerance)
|
||||
if isinstance(actual, float):
|
||||
if actual == 0.0:
|
||||
return str(actual) == str(expected)
|
||||
return repr(actual) == repr(expected)
|
||||
elif math.isnan(actual):
|
||||
return math.isnan(expected)
|
||||
return abs(actual - expected) <= tol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue