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

Method test_sketch_trisect

numericals_test.py:295–300  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

293 self.assertAlmostEqual(a.distance(b) * 2, a.distance(c))
294
295 def test_sketch_trisect(self):
296 a, b, c = random_points(3)
297 x, y = nm.sketch_trisect([a, b, c])
298 self.assertAlmostEqual(ang_between(b, a, x), ang_between(b, x, y))
299 self.assertAlmostEqual(ang_between(b, x, y), ang_between(b, y, c))
300 self.assertAlmostEqual(ang_between(b, a, x) * 3, ang_between(b, a, c))
301
302 def test_sketch_trisegment(self):
303 a, b = random_points(2)

Callers

nothing calls this directly

Calls 2

random_pointsFunction · 0.85
ang_betweenFunction · 0.85

Tested by

no test coverage detected