Tighten up when two vectors are considered 'equal'

This commit is contained in:
Matt Low 2020-11-15 13:34:17 +04:00
parent 4e0c6588e1
commit b89dc841f2

View File

@ -62,4 +62,4 @@ def is_equal(x1, y1, x2, y2):
"""Returns true if two unit vectors are pointed in either the same or """Returns true if two unit vectors are pointed in either the same or
opposite directions. opposite directions.
""" """
return math.isclose(abs(dot(x1, y1, x2, y2)), 1, rel_tol=1e-03) return math.isclose(abs(dot(x1, y1, x2, y2)), 1, rel_tol=1e-05)