function zeroCrossing(x0, y0, x1, y1) {
    var m = (y1-y0)/(x1-x0);
    var b = y1-m*x1;
    return -b/m;
  }
// Returns the x value where y crosses zero, using linear interpolation.
Returns the x value where y crosses zero, using linear interpolation.
Returns the x value where y crosses zero using linear interpolation .
function zeroCrossing(x0, y0, x1, y1) {
    var m = (y1-y0)/(x1-x0);
    var b = y1-m*x1;
    return -b/m;
  }
function zeroCrossing ( x0 , y0 , x1 , y1 ) { var m = ( y1 - y0 ) / ( x1 - x0 ) ; var b = y1 - m * x1 ; return - b / m ; }
Returns the x value where y crosses zero, using linear interpolation.
Returns the x value where y crosses zero using linear interpolation .