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

Function _perpendicular_bisector

numericals.py:374–376  ·  view source on GitHub ↗
(p1: Point, p2: Point)

Source from the content-addressed store, hash-verified

372
373
374def _perpendicular_bisector(p1: Point, p2: Point) -> Line:
375 midpoint = (p1 + p2) * 0.5
376 return Line(midpoint, midpoint + Point(p2.y - p1.y, p1.x - p2.x))
377
378
379def same_sign(

Callers 1

__init__Method · 0.85

Calls 2

LineClass · 0.70
PointClass · 0.70

Tested by

no test coverage detected