Distance

HC Graphics Turtle Motion Queries Distance
towardsXYZ DistanceXYZ

dist Distance pos


Outputs a number, the distance the turtle must travel along a straight line to reach the position pos given as the argument.

Example:

show distance [0 100]		;100
show distance [300 400]		;500
setheading towards [300 400]
fd distance [300 400]

Examples:

References:

towardsXYZ DistanceXYZ