def test_create_3P(self): p1 = (3., 3.) p2 = (5., 7.) p3 = (12., 5.) circle = ConstructionCircle.from_3p(p1, p2, p3) self.assertAlmostEqual(circle.center[0], 7.6875, 4) self.assertAlmostEqual(circle.center[1], 3.15625, 4) self.assertAlmostEqual(circle.radius, 4.6901, 4)
def test_create_3P(): p1 = (3., 3.) p2 = (5., 7.) p3 = (12., 5.) circle = ConstructionCircle.from_3p(p1, p2, p3) assert isclose(circle.center[0], 7.6875, abs_tol=1e-4) assert isclose(circle.center[1], 3.15625, abs_tol=1e-4) assert isclose(circle.radius, 4.6901, abs_tol=1e-4)