Example #1
0
 def test_rotate_not_origin(self):
     p = Point(origin=Vector([0.0, 2.0, 0.0]))
     axis = Axis(normal=[0.0, 0.0, 1.0], origin=[0.0, 1.0, 0.0])
     assert testing.all_close(p.rotate(axis, math.pi / 2),
                              Point([-1.0, 1.0, 0.0]))
Example #2
0
 def test_rotate_x(self):
     p = Point(origin=Vector([0.0, 2.0, 0.0]))
     assert testing.all_close(p.rotate(AXES3.x, math.pi / 2),
                              Point([0.0, 0.0, 2.0]))