Given the two points A(x1, y1) and B(x2, y2)
The distance |AB| =√[(X1-X2)^2+(Y1-Y2)^2]
For example, A(1, 2), B(3, 4), Then |AB|=√[(1-3)^2+(2-4)^2] = √8 = 2.8284271247461903.