dist

v0.1.6
dist();

Calculates the distance between 2 points in 2D or 3D space

dist(x1, y1, x2, y2);

Arguments

x1The x coordinate of the first point
y1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
dist(x1, y1, z1, x2, y2, z2);

Arguments

x1The x coordinate of the first point
y1The y coordinate of the first point
z1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
z2The z coordinate of the second point
dist(v1, v2);

Arguments

v1The first vector
v2The second vector

Returns

numberThe distance between the points

local d = dist(0, 0, 3, 4);
print(d) -- 5
See dist in lu5_math.h