Vec3:distance

Returns the distance to another vector.


distance = Vec3:distance(u)

Arguments

NameTypeDescription
uVec3 The vector to measure the distance to.

Returns

NameTypeDescription
distancenumber The distance to u.

distance = Vec3:distance(x, y, z)

Arguments

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

Returns

NameTypeDescription
distancenumber The distance to u.

See also