fixes #2379, removed duplicate method measuring distnce between a line and a segment