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

Method test_sketch_e5128

numericals_test.py:146–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

144 self.assertAlmostEqual(circle.radius, b.distance(c))
145
146 def test_sketch_e5128(self):
147 b = Point(0.0, 0.0)
148 c = Point(0.0, 1.0)
149 ang = unif(-np.pi / 2, 3 * np.pi / 2)
150 d = head_from(c, ang, 1.0)
151 a = Point(unif(0.5, 2.0), 0.0)
152
153 e, g = nm.sketch_e5128([a, b, c, d])
154 ang1 = ang_between(a, b, d)
155 ang2 = ang_between(e, a, g)
156 self.assertAlmostEqual(ang1, ang2)
157
158 def test_sketch_eq_quadrangle(self):
159 a, b, c, d = nm.sketch_eq_quadrangle([])

Callers

nothing calls this directly

Calls 3

head_fromFunction · 0.85
ang_betweenFunction · 0.85
PointClass · 0.70

Tested by

no test coverage detected