You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Looks like we use different versions or "euclid" lib.
In euclid version here, hash use Point2.__repr__ basically rounding coords values with a 0.01 precision.
The rounding for hash is likely to fix precision issues when it comes to merge points as close enough points will inherit the same hash value.
defhash_point2(p):
# this assume a 2.f precision from __repr__returnhash(p.__repr__())
defhash_point2(p, precision):
returnhash("Point2(%.{0}f, %.{0}f)".format(precision) % (p.x, p.y))
The text was updated successfully, but these errors were encountered:
Hi,
Looks like we use different versions or "euclid" lib.
In euclid version here, hash use
Point2.__repr__
basically rounding coords values with a 0.01 precision.The rounding for hash is likely to fix precision issues when it comes to merge points as close enough points will inherit the same hash value.
The text was updated successfully, but these errors were encountered: