Closed r-barnes closed 1 year ago
I always include a definition of M_2PI
in my constants because for some reason it is isn't defined in math.h
. In this case M_2PI
is being used in DgProjFuller.cpp
and DgProjISEA.cpp
. cmath
is included in those files, but when I comment out my M_2PI
definition it's not getting picked up. Not sure why, but I'm going to table this one for now.
@sahrk : My bad, it turns out M_2PI
is coming in from somewhere in Rcpp. Changing the variable name to dgM_2PI
or using namespaces would both fix the issue.
I've updated the diff to use #ifdef DGGRIDR
to suppress the issue by having dggridR use Rcpp's value for M_2PI. But this isn't the best solution since it means the value they use and the value you use could be different, compromising reproducibility.
You're not using this constant anywhere and, due to namespaces, it conflicts with cmath. Removing it seems like the best fix.