DISTANCE
Syntax DISTANCE [x y]
 
Explanation DISTANCE reports a number which is the distance in turtle steps from the first active turtle to the specified point. DISTANCE can be used to test how close a turtle is to another turtle, the mouse, or a target.
Examples ASK 1 [SETXY [50 50] SHOWTURTLE]
ASK 2 [SETXY [0 50] SHOWTURTLE]
DISTANCE ASK 1 [POS]
Result: 70.71
DISTANCE ASK 2 [POS]
Result: 50

TopIndex