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

Function head_from

numericals.py:1267–1269  ·  view source on GitHub ↗
(tail: Point, ang: float, length: float = 1)

Source from the content-addressed store, hash-verified

1265
1266
1267def head_from(tail: Point, ang: float, length: float = 1) -> Point:
1268 vector = Point(np.cos(ang) * length, np.sin(ang) * length)
1269 return tail + vector
1270
1271
1272def random_points(n: int = 3) -> list[Point]:

Callers 4

test_sketch_e5128Method · 0.85
sketch_eq_quadrangleFunction · 0.85
sketch_eqangle3Function · 0.85
sketch_triangleFunction · 0.85

Calls 2

cosMethod · 0.80
PointClass · 0.70

Tested by 1

test_sketch_e5128Method · 0.68