double small = getFlatness() * (1E-10);
double small = getFlatness() * EPSILON;
  private int getAxisIntersections(double x, double y, boolean useYaxis,                                   double distance)  {    int nCrossings = 0;    double a0;    double a1;    double a2;    double a3;    double b0;    double b1;    double b2;    double b3;    double[] r = new double[4];    int nRoots;    a0 = a3 = 0.0;    if (useYaxis)      {	a0 = getY1() - y;	a1 = getCtrlY1() - y;	a2 = getCtrlY2() - y;	a3 = getY2() - y;	b0 = getX1() - x;	b1 = getCtrlX1() - x;	b2 = getCtrlX2() - x;	b3 = getX2() - x;      }    else      {	a0 = getX1() - x;	a1 = getCtrlX1() - x;	a2 = getCtrlX2() - x;	a3 = getX2() - x;	b0 = getY1() - y;	b1 = getCtrlY1() - y;	b2 = getCtrlY2() - y;	b3 = getY2() - y;      }    /* If the axis intersects a start/endpoint, shift it up by some small        amount to guarantee the line is 'inside'       If this is not done, bad behaviour may result for points on that axis.*/    if (a0 == 0.0 || a3 == 0.0)      {	double small = getFlatness() * (1E-10);	if (a0 == 0.0)	  a0 += small;	if (a3 == 0.0)	  a3 += small;      }    if (useYaxis)      {	if (Line2D.linesIntersect(b0, a0, b3, a3, 0.0, 0.0, distance, 0.0))	  nCrossings++;      }    else      {	if (Line2D.linesIntersect(a0, b0, a3, b3, 0.0, 0.0, 0.0, distance))	  nCrossings++;      }    r[0] = a0;    r[1] = 3 * (a1 - a0);    r[2] = 3 * (a2 + a0 - 2 * a1);    r[3] = a3 - 3 * a2 + 3 * a1 - a0;    if ((nRoots = solveCubic(r)) != 0)      for (int i = 0; i < nRoots; i++)        {	  double t = r[i];	  if (t >= 0.0 && t <= 1.0)	    {	      double crossing = -(t * t * t) * (b0 - 3 * b1 + 3 * b2 - b3)	                        + 3 * t * t * (b0 - 2 * b1 + b2)	                        + 3 * t * (b1 - b0) + b0;	      if (crossing > 0.0 && crossing <= distance)		nCrossings++;	    }        }    return (nCrossings);  }