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

Function check_const_angle

numericals.py:735–746  ·  view source on GitHub ↗

Check if the angle is equal to the given constant.

(points: list[Point])

Source from the content-addressed store, hash-verified

733
734
735def check_const_angle(points: list[Point]) -> bool:
736 """Check if the angle is equal to the given constant."""
737 a, b, c, d, m, n = points
738 a, b, c, d = bring_together(a, b, c, d)
739 ba = b - a
740 dc = d - c
741
742 a3 = np.arctan2(ba.y, ba.x)
743 a4 = np.arctan2(dc.y, dc.x)
744 y = a3 - a4
745
746 return close_enough(m / n % 1, y / np.pi % 1)
747
748
749def check_eqangle(points: list[Point]) -> bool:

Callers

nothing calls this directly

Calls 2

bring_togetherFunction · 0.85
close_enoughFunction · 0.85

Tested by

no test coverage detected