镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Fix M_PI on Windows - #33

Closed
Ace314159 wants to merge 1 commit into
ros:foxy-develfrom
Ace314159:foxy-devel
Closed

Ace314159 wants to merge 1 commit into
ros:foxy-develfrom
Ace314159:foxy-devel

Conversation

@Ace314159

Copy link
Copy Markdown
Contributor

On Windows, in order to use M_PI, _USE_MATH_DEFINES must be defined. Since M_PI is used in a header file, I think it should be defined at the top instead of requiring any downstream packages using this library to define it themselves.

@tfoote tfoote left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the correct behavior as documented here: https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-170

@sloretz

sloretz commented Jan 27, 2022

Copy link
Copy Markdown
Contributor

Unless this is a backport, I think this should be targeting the ros2 branch instead of foxy-devel.

@Ace314159 Ace314159 mentioned this pull request Jan 28, 2022
@Ace314159

Copy link
Copy Markdown
Contributor Author

@sloretz I made #34 to target the ros2 branch. Should I make a PR for galactic-devel as well?

@gbiggs

gbiggs commented Jan 30, 2022

Copy link
Copy Markdown
Contributor

No, we will create backport PRs once the Rolling PR is merged.

@gbiggs gbiggs closed this Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants