code: private static void refineInterval(double[] interval, int cd, int mask) {
          if ((cd & mask) != 0)
              interval[0] = (interval[0] + interval[1]) / 2;
          else
              interval[1] = (interval[0] + interval[1]) / 2;
      }
docs: Refines interval by a factor or 2 in either the 0 or 1 ordinate.
  
  @param interval
  two entry array of double values
  @param cd
  used with mask
  @param mask
  used with cd