diff --git a/geom/demos/sat.py b/geom/demos/sat.py index 8e10187..95434b3 100644 --- a/geom/demos/sat.py +++ b/geom/demos/sat.py @@ -76,7 +76,7 @@ class SeparatingAxisTheorem: def add_if_not_exists(normal): for existing in normals: - if is_equal(*existing, *normal): + if is_colinear(*existing, *normal): return normals.append(normal) diff --git a/geom/math.py b/geom/math.py index 3734360..14d3e5a 100644 --- a/geom/math.py +++ b/geom/math.py @@ -58,8 +58,7 @@ def vmax(x1, y1, x2, y2): return max(x1, x2), max(y1, y2) -def is_equal(x1, y1, x2, y2): - """Returns true if two unit vectors are pointed in either the same or - opposite directions. - """ +def is_colinear(x1, y1, x2, y2): + """Returns whether two unit vectors are pointed in the same or + opposite directions.""" return math.isclose(abs(dot(x1, y1, x2, y2)), 1, rel_tol=1e-05)