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

Function check_too_far

numericals.py:602–612  ·  view source on GitHub ↗
(
    newpoints: list[Point], points: list[Point], tol: int = 4
)

Source from the content-addressed store, hash-verified

600
601
602def check_too_far(
603 newpoints: list[Point], points: list[Point], tol: int = 4
604) -> bool:
605 if len(points) < 2:
606 return False
607 avg = sum(points, Point(0.0, 0.0)) * 1.0 / len(points)
608 maxdist = max([p.distance(avg) for p in points])
609 for p in newpoints:
610 if p.distance(avg) > maxdist * tol:
611 return True
612 return False
613
614
615def check_aconst(args: list[Point]) -> bool:

Callers 1

try_to_sketch_intersectFunction · 0.85

Calls 2

PointClass · 0.70
distanceMethod · 0.45

Tested by

no test coverage detected