Example #1
0
 def test_rotation(self, a: Point, angle: Angle, center: Point):
     assume(abs(a - center) != 0)
     b = a.rotate(angle, center)
     new_angle = (b - center).angle() - (a - center).angle()
     note(angle)
     note(new_angle)
     assert isclose(angle, angle)
Example #2
0
 def test_rotation_about_zero(self, a: Point, angle: Angle):
     assume(abs(a) != 0)
     b = a.rotate(angle, Point(0.0, 0.0))
     aa = a.angle()
     bb = b.angle()
     note(f"a angle: {aa}")
     note(f"b angle: {bb}")
     assert isclose(bb - aa, angle)