dist();
Calculates the distance between 2 points in 2D or 3D space
dist(x1, y1, x2, y2);
Arguments
x1
The x coordinate of the first pointy1
The y coordinate of the first pointx2
The x coordinate of the second pointy2
The y coordinate of the second pointdist(x1, y1, z1, x2, y2, z2);
Arguments
x1
The x coordinate of the first pointy1
The y coordinate of the first pointz1
The y coordinate of the first pointx2
The x coordinate of the second pointy2
The y coordinate of the second pointz2
The z coordinate of the second pointdist(v1, v2);
Arguments
v1
The first vectorv2
The second vectorReturns
number
The distance between the pointslocal d = dist(0, 0, 3, 4);
print(d) -- 5