The Modern C# Challenge
上QQ阅读APP看书,第一时间看更新

30. Point-line distance

Write a program that determines the closest point and shortest distance between a point and a line. Let the user left-click twice to define the line and right-click once to define the point. Draw the line and point, and a dashed line showing the shortest distance, as shown in the following screenshot: