MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / check_acompute

Method check_acompute

graph.py:1977–1993  ·  view source on GitHub ↗

Check if an angle has a constant value.

(self, points: list[Point])

Source from the content-addressed store, hash-verified

1975 return False
1976
1977 def check_acompute(self, points: list[Point]) -> bool:
1978 """Check if an angle has a constant value."""
1979 a, b, c, d = points
1980 ab = self._get_line(a, b)
1981 cd = self._get_line(c, d)
1982 if not ab or not cd:
1983 return False
1984
1985 if not (ab.val and cd.val):
1986 return False
1987
1988 for ang0 in self.aconst.values():
1989 for ang in ang0.val.neighbors(Angle):
1990 d1, d2 = ang.directions
1991 if ab.val == d1 and cd.val == d2:
1992 return True
1993 return False
1994
1995 def check_eqangle(self, points: list[Point]) -> bool:
1996 """Check if two angles are equal."""

Callers 1

checkMethod · 0.95

Calls 2

_get_lineMethod · 0.95
neighborsMethod · 0.80

Tested by

no test coverage detected