Vec4:distance

Returns the distance to another vector.


distance = Vec4:distance(u)

Arguments

NameTypeDescription
uVec4 The vector to measure the distance to.

Returns

NameTypeDescription
distancenumber The distance to u.

distance = Vec4:distance(x, y, z, w)

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.
wnumber A value of w component to measure distance to.

Returns

NameTypeDescription
distancenumber The distance to u.

See also