the checkpoint builds two rectangular triagles to the line when it's within two less-than-90°
the ankathede of both is the distance to the line.
...perhaps a calculation using ()² and Sqr() could follow this ansatz without trigonometric functions....
[edit]
Line |AB|, Checkpoint C... Footpoint D
|CD|² = |AD|² - |AC|²
|CD|² = |BD|² - |BC|²
AD + BD = AB
is what we know...
we don't need Sqr() so far, perhaps never because we could check against CollDist²
is this enough to make you go, srod?
it's too late for me tonight to get deep into intercept theorems and combined Pytagorases...
...the distances themselves are again Sqr()s of dXs and dYs,
all together we will have Xs and Ys like fat and meat in a salami...




