setHeading
index
 
Name setHeading ()
Description Sets Turtle's heading--the direction the Turtle is facing.
Syntax setHeading (angle);
Parameters
angle  Turtle's new heading, in degrees. (double)
Returns
None  
Related setX()
setY()

getX()
getY()
getHeading()

Example

    Turtle t = new Turtle(this);

    t.right(45);
    t.forward(50);
    t.setHeading(0); 
    t.forward(50);
    t.drawPath(g);