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

Function sketch_square

numericals.py:1838–1842  ·  view source on GitHub ↗
(args: tuple[gm.Point, ...])

Source from the content-addressed store, hash-verified

1836
1837
1838def sketch_square(args: tuple[gm.Point, ...]) -> tuple[Point, Point]:
1839 a, b = args
1840 c = b + (a - b).rotatea(-np.pi / 2)
1841 d = a + (b - a).rotatea(np.pi / 2)
1842 return c, d
1843
1844
1845def sketch_isquare(args: tuple[gm.Point, ...]) -> tuple[Point, ...]:

Callers

nothing calls this directly

Calls 1

rotateaMethod · 0.80

Tested by

no test coverage detected