i dont think it should matter (mathematically) whether x1 >= x2 because lets say it isn't
Assume x1 = -5 and x2 = 2, adding them together will give -3, well distances can't be negative right, but then you square that, and anything squared is positive so it shouldn't matter, however, somewhere in the programming it may get messed up, I ended up ripping out a function out of a plugin on the forums the one that lets you voice chat to only nearby players... this method DOES work and works well...
Code:
stock Float:vecdist(Float:vec1[3], Float:vec2[3])
{
new Float:x = vec1[0] - vec2[0]
new Float:y = vec1[1] - vec2[1]
new Float:z = vec1[2] - vec2[2]
x*=x;
y*=y;
z*=z;
return floatsqroot(x+y+z);
}
__________________