Roll back to epsilon difference on position __eq__
@@ -3,6 +3,8 @@ import math
import random
from typing import Any, Dict, List, Optional, Set, Tuple, Union # for mypy type checking
+EPSILON = 10 ** -8
+
def _sign(num):
return math.copysign(1, num)
@@ -136,7 +138,7 @@ class Pointlike(tuple):
def __eq__(self, other):
try:
- return all(a == b for a, b in itertools.zip_longest(self, other, fillvalue=0))
+ return all(abs(a - b) <= EPSILON for a, b in itertools.zip_longest(self, other, fillvalue=0))
except:
return False
