Formulas:

Midpoint:

(x+x²/2,y+y²/2)=average

Distance:

[(x2-x1)²+(y2-y1)²]