Intro FLoating point for calculation Project the vector AP onto AB Distance of point to line segment A nice optimization to avoid square root Error checking Need to check if line segment points A and B are the same