Calcuate distance from foot of perpendicular to line
https://math.stackexchange.com/questions/33868/foot-of-perpendicular-to-line