(self)
| 48 | assert_allclose(turtle.position, (2, 0, 0), atol=1e-15) |
| 49 | |
| 50 | def test_roll(self): |
| 51 | # Roll is about the longitudinal axis, so roll() + forward() won't change direction. |
| 52 | turtle = Turtle() |
| 53 | assert_allclose(turtle.position, (0, 0, 0)) |
| 54 | turtle.roll(45) |
| 55 | turtle.forward() |
| 56 | assert_allclose(turtle.position, (0, 0, 1)) |
| 57 | turtle.yaw(45) |
| 58 | turtle.forward() |
| 59 | assert_allclose(turtle.position, (1 / 2, -1 / 2, 1 + np.sqrt(2) / 2)) |
| 60 | |
| 61 | def test_pitch(self): |
| 62 | turtle = Turtle() |