Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这里黑点画了一条线,它可能有n个点,我的问题是找到绿点和线之间的最短距离(不是黑点)
线和点之间的距离已经回答: 点和线段之间的最短距离
您只需要添加另一部分来循环所有线段并找到最短的线段。