code: private boolean isIntersect(double z0, double z1, double zc) {
          if ((z0 - zc) * (z1 - zc) < 0.0) {
              return true;
          }
  
          return false;
      }
docs: Returns true if zc is between z0 and z1.