distance from linesegment a-b to point p