Asked • 03/23/19

The distance from a point to a line segment?

I'm pretty sure this may be a duplicate post somewhere, but I've searched all through the internet looking for a definite formula to calculate the distance between a point and a line segment. There are so many different variations of the formula that people have posted that its hard to determine which is correct. I actually have several points that I will be looping through to get their distances. Each point will be within the boundary of the segment(if that makes any sense) so there will be no need to perform this theoretical check of the point being 'within' the segment that I've somewhat heard about. So can anyone please post the correct formula to calculate the distance of a point C(x,y) from a line segment AB??

1 Expert Answer

By:

David W. answered • 03/23/19

Tutor
4.7 (90)

Experienced Prof

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.