Vec2:distance

Returns the distance to another vector.


distance = Vec2:distance(u)

Arguments

NameTypeDescription
uVec2 The vector to measure the distance to.

Returns

NameTypeDescription
distancenumber The distance to u.

distance = Vec2:distance(x, y)

Arguments

NameTypeDescription
xnumber A value of x component to measure distance to.
ynumber A value of y component to measure distance to.

Returns

NameTypeDescription
distancenumber The distance to u.

See also