ComplexMathUtils { public static double arg(final ComplexNumber z) { ArgumentChecker.notNull(z, "z"); return Math.atan2(z.getImaginary(), z.getReal()); }  static ComplexNumber add(final ComplexNumber z1, final ComplexNumber z2); static ComplexNumber add(final ComplexNumber... z); static ComplexNumber add(final ComplexNumber z, final double x); static ComplexNumber add(final double x, final ComplexNumber z); static double arg(final ComplexNumber z); static ComplexNumber conjugate(final ComplexNumber z); static ComplexNumber divide(final ComplexNumber z1, final ComplexNumber z2); static ComplexNumber divide(final ComplexNumber z, final double x); static ComplexNumber divide(final double x, final ComplexNumber z); static ComplexNumber exp(final ComplexNumber z); static ComplexNumber inverse(final ComplexNumber z); static ComplexNumber log(final ComplexNumber z); static double mod(final ComplexNumber z); static ComplexNumber square(final ComplexNumber z); static ComplexNumber multiply(final ComplexNumber z1, final ComplexNumber z2); static ComplexNumber multiply(final ComplexNumber... z); static ComplexNumber multiply(final double x, final ComplexNumber... z); static ComplexNumber multiply(final ComplexNumber z, final double x); static ComplexNumber multiply(final double x, final ComplexNumber z); static ComplexNumber pow(final ComplexNumber z1, final ComplexNumber z2); static ComplexNumber pow(final ComplexNumber z, final double x); static ComplexNumber pow(final double x, final ComplexNumber z); static ComplexNumber sqrt(final ComplexNumber z); static ComplexNumber subtract(final ComplexNumber z1, final ComplexNumber z2); static ComplexNumber subtract(final ComplexNumber z, final double x); static ComplexNumber subtract(final double x, final ComplexNumber z);  }
@Test public void testArg() { assertEquals(Math.atan2(W, V), ComplexMathUtils.arg(Z1), EPS); }