docs: private static boolean envelopeCrossesEnvelope_(Envelope2D env_a,
  			Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
  		if (envelopeInfContainsEnvelope_(env_a, env_b, tolerance)
  				|| envelopeInfContainsEnvelope_(env_b, env_a, tolerance))
  			return false;
  
  		if (env_a.getHeight() <= tolerance && env_a.getWidth() <= tolerance)
  			return false; // points cannot cross
  
  		if (env_b.getHeight() <= tolerance && env_b.getWidth() <= tolerance)
  			return false; // points cannot cross
  
  		if (env_b.getHeight() > tolerance && env_b.getWidth() > tolerance) {
  			if (env_a.getHeight() > tolerance && env_a.getWidth() > tolerance)
  				return false; // areas cannot cross
  		}
  
  		Envelope2D _env_a;
  		Envelope2D _env_b;
  
  		if (env_a.getHeight() > tolerance && env_a.getWidth() > tolerance) {
  			// swap b and a
  			_env_a = env_b;
  			_env_b = env_a;
  		} else {
  			_env_a = env_a;
  			_env_b = env_b;
  		}
  
  		if (_env_b.getHeight() > tolerance && _env_b.getWidth() > tolerance) {// treat
  																				// env_b
  																				// as
  																				// an
  																				// area
  																				// (env_a
  																				// as
  																				// a
  																				// line);
  
  			Envelope2D env_inter = new Envelope2D(), env_b_deflated = new Envelope2D();
  			env_b_deflated.setCoords(_env_b);
  			env_b_deflated.inflate(-tolerance, -tolerance);
  			env_inter.setCoords(env_b_deflated);
  			env_inter.intersect(_env_a);
  
  			if (env_inter.isEmpty())
  				return false;
  
  			if (env_inter.getHeight() <= tolerance
  					&& env_inter.getWidth() <= tolerance)
  				return false; // not a line
  
  			assert (!envelopeInfContainsEnvelope_(env_inter, _env_a, tolerance));
  			return true;
  		}
  
  		// treat both as lines
  
  		Line line_a = new Line(), line_b = new Line();
  		double[] scalars_a = new double[2];
  		double[] scalars_b = new double[2];
  		Point2D pt = new Point2D();
  		_env_a.queryLowerLeft(pt);
  		line_a.setStartXY(pt);
  		_env_a.queryUpperRight(pt);
  		line_a.setEndXY(pt);
  		_env_b.queryLowerLeft(pt);
  		line_b.setStartXY(pt);
  		_env_b.queryUpperRight(pt);
  		line_b.setEndXY(pt);
  
  		line_a.intersect(line_b, null, scalars_a, scalars_b, tolerance);
  		int count = line_a.intersect(line_b, null, null, null, tolerance);
  
  		if (count != 1)
  			return false;
  
  		return scalars_a[0] > 0.0 && scalars_a[1] < 1.0 && scalars_b[0] > 0.0
  				&& scalars_b[1] < 1.0;
  	}