How to compute distance between to points ?
for example between
a(-150,20) and b(200,400)
or
a(10,25) and b(-250,140)
or
a(10,20) and b(100,56)
i use this formulae but not work properly :
dx = (bx-ax)^2
dy = (by-ay)^2
distance = sqr(dx+dy)
Thanks !
for example between
a(-150,20) and b(200,400)
or
a(10,25) and b(-250,140)
or
a(10,20) and b(100,56)
i use this formulae but not work properly :
dx = (bx-ax)^2
dy = (by-ay)^2
distance = sqr(dx+dy)
Thanks !