Replace infinity tests with inequality

This commit is contained in:
Eyal authored and GitHub committed 2018-07-13 11:57:52 +03:00
1 parent 792fe328ef
commit 8c1262dd3f
1 file changed
+1 -1
+1 -1
View File
@@ -165,7 +165,7 @@ class MinMax3D(object):
for c in "xyz":
min = getattr(self.min, c)
max = getattr(self.max, c)
value = abs(max - min) if not math.isinf(min) and not math.isinf(max) else 0.0
value = abs(max - min) if max >= min else 0.0
setattr(result, c, value)
return result