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

Function check_contri

numericals.py:823–836  ·  view source on GitHub ↗
(points: list[Point])

Source from the content-addressed store, hash-verified

821
822
823def check_contri(points: list[Point]) -> bool:
824 a, b, c, x, y, z = points
825 ab = a.distance(b)
826 bc = b.distance(c)
827 ca = c.distance(a)
828 xy = x.distance(y)
829 yz = y.distance(z)
830 zx = z.distance(x)
831 tol = 1e-9
832 return (
833 close_enough(ab, xy, tol)
834 and close_enough(bc, yz, tol)
835 and close_enough(ca, zx, tol)
836 )
837
838
839def check_ratio(points: list[Point]) -> bool:

Callers

nothing calls this directly

Calls 2

close_enoughFunction · 0.85
distanceMethod · 0.45

Tested by

no test coverage detected