Skip to content

Include a central math header file for math constants #95

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

Open
alexander-novo opened this issue May 6, 2025 · 0 comments
Open

Include a central math header file for math constants #95

alexander-novo opened this issue May 6, 2025 · 0 comments
Assignees
Labels
development Features/Tools related to development of GridKit, rather than use as a library.

Comments

@alexander-novo
Copy link
Collaborator

As mentioned in #85 it's a little inconvenient to have _USE_MATH_DEFINES littered everywhere we want to use a math constant in.

My suggestion would be to have a file with constants protected with a namespace and something like constexpr real_type PI = M_PI. We can def and undef _USE_MATH_DEFINES around it. In any case, we need one place where we define $\pi$ in the entire code. I would use a separate PR for that, though.

Originally posted by @pelesh in #85 (comment)

@alexander-novo alexander-novo added the development Features/Tools related to development of GridKit, rather than use as a library. label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Features/Tools related to development of GridKit, rather than use as a library.
Projects
None yet
Development

No branches or pull requests

1 participant