This has been driving me nuts for quite a bit now, and I am quite rusty when it comes to trig and geometry. I understand that the code mentioned (to my understanding) creates a triangle.

[code]if (hypot(x - p.x, y-p.y) < 20.0) { // no idea why …

[/code]

My confusion derives from the idea that if the length of the hypotenuse is less than 20, then the line has been selected. Could anyone try to explain how this evaluates to true and why the number 20?