answersLogoWhite

0

The formula:

distance=sqrt(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))+((z1-z2)*(z1-z2)))

In DarkBASIC it's:

function distance3D(x1,y1,z1,x2,y2,z2)

x=x1-x2

y=y1-y2

z=z1-z2 result=sqrt((x*x)+(y*y)+(z*z)) endfunction result

In classic BASIC I think it's:

FUNCTION distance3D(x1,y1,z1,x2,y2,z2)

x=x1-x2

y=y1-y2

z=z1-z2 result=SQRT((x*x)+(y*y)+(z*z))

RETURN result

END FUNCTION

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake

Add your answer:

Earn +20 pts
Q: What is the distance formula in 3D?
Write your answer...
Submit
Still have questions?
magnify glass
imp