The translation was performed mostly "by hand" and a lot of modifications to the original program were introduced in order to modernize the NEC2 and to remove as many built-in limitations as possible. The attendant SOMNEC program was also translated to C and incorporated in nec2c as a function so that Sommerfeld ground solutions are a part of the program. PR: ports/83392 Submitted by: Diane Bruce <db@db.net>
20 lines
419 B
C
20 lines
419 B
C
/* carg.f -- translated by f2c (version 20000817).
|
|
*/
|
|
#include <math.h>
|
|
#include <complex.h>
|
|
|
|
double carg(complex z__)
|
|
{
|
|
/* System generated locals */
|
|
double ret_val;
|
|
|
|
/* april 1977 version. w. fullerton, c3, los alamos scientific lab. */
|
|
|
|
ret_val = (float)0.;
|
|
if (creal(z__) != (float)0. || cimag(z__) != (float)0.) {
|
|
ret_val = atan2(cimag(z__), creal(z__));
|
|
}
|
|
|
|
return ret_val;
|
|
} /* carg */
|
|
|