Find point farthest from line
-
12-11-2019 - |
Question
I have an array of points, as well as two more points (A and B). The last two points form a line, and I'm trying to find which of the points in my array are furthest from the line. How would I do this in Java?
I'm wondering if it's something along the lines of finding the distance from A and B, but that doesn't sit well in my head.
Additional info: I think it's a line segment. Given this is QuickHull, I don't know if it makes a difference. I've never been the greatest when it comes to math and formulas, so more explanation is better. Thanks!
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow