Distance between two points in 3d.

Blitz3D Forums/Blitz3D Programming/Distance between two points in 3d.

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

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?