The Line::getDistanceFromPoint() method has the following calculation:
auto prop = ((targetPoint.x - start.x) * delta.x + (targetPoint.y - start.y) * delta.y) / length;
The auto resolves to an int type when we have Line<int> and so the proportion is truncated to 0 or 1.
Looking at the git log I see this was changed from double to auto on April 24, 2017, with commit e0698daacabc90c791b33c0ec928091418e03feb. So, it’s probably recently broken, although Line<int> doesn’t seem to be used much.
Thanks for taking a look!
Rob
