code: public ComplexDouble addi(double a, ComplexDouble result) {
      if (this == result) {
        r += a;
      } else {
        result.r = r + a;
        result.i = i;
      }
      return result;
    }
docs: Add a real number to a complex number in-place.
  
  @param a      real number to add
  @param result complex number to hold result
  @return same as result