title: Find if point lies on line segment
body: <p>I have line segment defined by these two points: <strong>A(x1,y1,z1)</strong> and <strong>B(x2,y2,z2)</strong>. I have point <strong>p(x,y,z)</strong>. How can I check if the point lies on the line segment?</p>