Original Post
I have read this article about distances from point to line and line segments
http://geometryalgorithms.com/Archive/algorithm_0102/algorithm_0102.htm#Distance%20to%20Ray%20or%20Segment
but i don''t understand the last part about the line segments.
I currently have the distance from the point to the infinite line but i just don''t understand what this article says about making it work for a line segment. Are there an easier way?
In other words:
If i have a line Xa,Ya,Yb,Yb:
|----------|
How can i tell if the point is not ''over'' the line so i can use the normal distance formulae to the point. And how to tell what point to find the distance to if the point is not ''over'' the line?
I hope you understand