Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « turtle » Python 3.11.3

Fonction tiltangle - module turtle

Signature de la fonction tiltangle

def tiltangle(angle=None) 

Description

help(turtle.tiltangle)

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 given: return the current tilt-angle, i. e. the angle
        between the orientation of the turtleshape and the heading of the
        turtle (its direction of movement).

        (Incorrectly marked as deprecated since Python 3.1, it is really
        settiltangle that is deprecated.)

        Examples:
        >>> shape("circle")
        >>> shapesize(5, 2)
        >>> tiltangle()
        0.0
        >>> tiltangle(45)
        >>> tiltangle()
        45.0
        >>> stamp()
        >>> fd(50)
        >>> tiltangle(-45)
        >>> tiltangle()
        315.0
        >>> stamp()
        >>> fd(50)