Adds Arg(X) sugar function (closes #625) #626

Merged
merged 2 commits into from Jan 8, 2017

Projects

None yet

3 participants

@coatless
Contributor
coatless commented Jan 8, 2017

No description provided.

@codecov-io
codecov-io commented Jan 8, 2017 edited

Current coverage is 76.82% (diff: 100%)

Merging #626 into master will not change coverage

@@             master       #626   diff @@
==========================================
  Files            67         67          
  Lines          3992       3992          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           3067       3067          
  Misses          925        925          
  Partials          0          0          

Powered by Codecov. Last update 8ac38d7...911201a

@eddelbuettel

LGTM

@@ -68,6 +68,7 @@ inline double complex__Re( Rcomplex x){ return x.r ; }
y.i = -x.i ;
return y ;
}
+ inline double complex__Arg( Rcomplex x ){ return ::atan2(x.i, x.r); }
@eddelbuettel
eddelbuettel Jan 8, 2017 Member

The vertical alignment seems to a little out of whack but we can fix that later.

@eddelbuettel eddelbuettel merged commit 81c40d7 into RcppCore:master Jan 8, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment