Original Post
I know the distance formula for 2d but im not too sure on the 3d part would some like this work:
is that right or is there another way ?
[edited by - Luke1 on March 11, 2003 4:18:26 PM]
int GetDist(int x1, int y1, int z1, int x2, int y2, int z2)
{
return sqr(((x1-x2)^2)+((y1-y2)^2)+((z1-z2)^2))
}