-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
Complex sugar ops have support for the following R equivalents:
Re
Im
Mod
Conj
but no support for the Arg
function that determines the angle between the real and complex plane (counter-clockwise).
Given the availability of the cpp port of the fortran atan2
inverse function, the base R imp of Arg
is easy to mirror. Two-liner addition to the complex header:
inline double complex__Arg( Rcomplex x ){ return ::atan2(x.i, x.r); }
RCPP_SUGAR_COMPLEX( Arg, double )
Metadata
Metadata
Assignees
Labels
No labels