How do you use distance calculator in procedure function and how to compare this?

DISClac.aia (3.1 KB)

What is the issue? Your distance formula looks OK.

Why is your distance function ignoring its parameters?

Please read http://www.appinventor.org/bookChapters/chapter21.pdf
of book http://www.appinventor.org/book2
from FAQ Section: Books, Tips, Tutorials for AI2

Actually, on a second look, your formula was wrong.

I have re-written your blocks so that they look and work correctly.

There are two points, P1 and P2, each have x,y values

best to test with points on a right angled triangle, e.g. 3,4 > 5 or 120,160 > 200

What did you see?

I see (x2-x1)^2 instead of (x1-x2)^2, but the squaring operation washes away the negative sign, leaving you with a correct result.

but you are correct, it shouldn't make any difference....