Fairly basic question, but I need to find the distance between two points in 3d, using software. As far as I'm aware, the formula is :
xd=x2-x1
yd=y2-y1
zd=z2-z1
distance#=sqr(xd*xd+yd*yd+zd*zd)
But it isn't working in my program. I've tried putting brackets around (xd*xd)+(yd*yd)... etc, that doesn't work either. I am using very, very large numbers, as high as 1,000,000,000, but should that make a difference? Is the formula correct?
xd=x2-x1
yd=y2-y1
zd=z2-z1
distance#=sqr(xd*xd+yd*yd+zd*zd)
But it isn't working in my program. I've tried putting brackets around (xd*xd)+(yd*yd)... etc, that doesn't work either. I am using very, very large numbers, as high as 1,000,000,000, but should that make a difference? Is the formula correct?