How to select a line
问题 So I'm trying to figure out how to implement a method of selecting lines or edges in a drawing area but my math is a bit lacking. This is what I got so far: A collection of lines, each line has two end points (one to start and one to end the line) The lines are drawn correctly on a canvas Mouse clicks events are received when clicking the canvas, so I can get the x and y coordinate of the mouse pointer I know I can iterate through the list of lines, but I have no idea how to construct an