MATH: Fix Line2d intersection functions. Fix #682