Calculates distance of a point from a line that is infinite long.

In this picture then red point is within the scope of the line and shortest distance from the line is calculated at straight angle. For the blue point then it can be seen that the line gets extended and then shortest distance is calculated at straight angle.