Distance from a point to a line (source code)

= Distance from a point to a line
{title2=$d=|Ax_0+By_0+C|/\sqrt{A^2+B^2}$}
{wiki}

For a line $Ax+By+C=0$ with $A^2+B^2>0$, its <unit normal> is $(A,B)/\sqrt{A^2+B^2}$. Choose any point on the line and project the displacement to $(x_0,y_0)$ onto this normal. The absolute value of that projection gives the title formula. This is the shortest <Euclidean distance>, because any displacement to a different point on the line has the same normal component and an additional orthogonal tangential component.