Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch one PI to M_PI to support STRICT_R_HEADERS #118

Merged
merged 1 commit into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PKG_CPPFLAGS = -I../inst/include
PKG_CPPFLAGS = -I../inst/include -DSTRICT_R_HEADERS
PKG_LIBS = @libs@
PKG_CXXFLAGS = @cflags@ -pthread
CXX_STD = CXX11
Expand Down
2 changes: 1 addition & 1 deletion src/s2-transformers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ List cpp_s2_unary_union(List geog, List s2options) {

// Check if the builder created a polygon whose boundary contained more than
// half the earth (and invert it if so)
if (loop->GetArea() > (2 * PI)) {
if (loop->GetArea() > (2 * M_PI)) {
loop->Invert();
}

Expand Down