Update Line2D.java

Solved the NaN problem when the coefficient of y was 0. Some results that were negative now are showing correctly