mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Fix float value comparisons, only consider values equal if both are NaN
This commit is contained in:
@@ -246,7 +246,7 @@ def value_compare(ref, data):
|
||||
return False
|
||||
|
||||
# Special handling for NaNs
|
||||
if math.isnan(ref) == math.isnan(data):
|
||||
if math.isnan(ref) and math.isnan(data):
|
||||
return True
|
||||
|
||||
# Floats are equal if the absolute difference is less than epsilon times the largest.
|
||||
|
||||
Reference in New Issue
Block a user