1.fixed finding a crossing point bug for ray's k>0, not working for k<0