code: public static double[] getReal(ComplexNumber[] cn) {
          double[] n = new double[cn.length];
          for (int i = 0; i < n.length; i++) {
              n[i] = cn[i].real;
          }
          return n;
      }
docs: Get real part from the complex numbers.
  
  @param cn Complex numbers.
  @return Real part.