setX
index
 
Name setX ()
Description Sets Turtle's X coordinate. Creates a line between the previous location and new location (with new X coordinate).
Syntax setX (x);
Parameters
x  Turtle's new X coordinate (float)
Returns
None  
Related setX()
setY()
setHeading()

getX()
getY()
getHeading()

Example

    import Turtle.*;
    size(500,500);
    background(255);
    stroke(0);

    Turtle t = new Turtle(this);

    t.forward(50);
    t.setX(0);