Set or return the current tilt-angle. Optional argument: angle -- number Rotate the turtleshape to point in the direction specified by angle, regardless of its current tilt-angle. DO NOT change the turtle's heading (direction of movement). If angle is not gi
(self, angle=None)
| 2764 | self.pen(resizemode="user", tilt=tilt) |
| 2765 | |
| 2766 | def tiltangle(self, angle=None): |
| 2767 | """Set or return the current tilt-angle. |
| 2768 | |
| 2769 | Optional argument: angle -- number |
| 2770 | |
| 2771 | Rotate the turtleshape to point in the direction specified by angle, |
| 2772 | regardless of its current tilt-angle. DO NOT change the turtle's |
| 2773 | heading (direction of movement). |
| 2774 | If angle is not given: return the current tilt-angle, i. e. the angle |
| 2775 | between the orientation of the turtleshape and the heading of the |
| 2776 | turtle (its direction of movement). |
| 2777 | |
| 2778 | Deprecated since Python 3.1 |
| 2779 | |
| 2780 | Examples (for a Turtle instance named turtle): |
| 2781 | >>> turtle.shape("circle") |
| 2782 | >>> turtle.shapesize(5,2) |
| 2783 | >>> turtle.tilt(45) |
| 2784 | >>> turtle.tiltangle() |
| 2785 | """ |
| 2786 | if angle is None: |
| 2787 | tilt = -self._tilt * (180.0/math.pi) * self._angleOrient |
| 2788 | return (tilt / self._degreesPerAU) % self._fullcircle |
| 2789 | else: |
| 2790 | self.settiltangle(angle) |
| 2791 | |
| 2792 | def tilt(self, angle): |
| 2793 | """Rotate the turtleshape by angle. |