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

Modernized some code, willing to work on more. #1346 #1387

Closed
wants to merge 2 commits into from
Closed

Modernized some code, willing to work on more. #1346 #1387

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 22, 2023

#1346 Description:
#Used constexpr to define M_PI instead of a preprocessor macro.
#Removed #define preprocessor directive and used a more standard constexpr definition for M_PI.
#Updated loopvariables
I am also willing to change the variable types to use Eigen::Index, but i am a little unsure. I think it will ensure a better code.
I am new to opensource, and any newsuggestions would certainly be very helpful.
Thank you!

@welcome
Copy link

welcome bot commented Oct 22, 2023

Thanks for opening this pull request! Please check out our contributing guidelines and check for the automated tests.

@ghost ghost changed the title Modernized some code, willing to work on more. Modernized some code, willing to work on more. #1346 Oct 22, 2023
@ghutchis
Copy link
Member

Thanks. There is already a PR for constexpr M_PI #1383 but IIRC there are a few more like DEG_TO_RAD (see avogadro/core/avogadrocore.h)

This commit only includes .vscode/settings.json which frankly needs to go into the .gitignore file: https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

@ghutchis
Copy link
Member

I'm also not sure I understand what you mean by updating loop variables.

@ghost
Copy link
Author

ghost commented Oct 23, 2023

Thanks. There is already a PR for constexpr M_PI #1383 but IIRC there are a few more like DEG_TO_RAD (see avogadro/core/avogadrocore.h)

This commit only includes .vscode/settings.json which frankly needs to go into the .gitignore file: https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

I guess i made some mistakes in using github, sorry as i am a little bit new to it. I will get back to this asap.

@ghost
Copy link
Author

ghost commented Oct 23, 2023

I'm also not sure I understand what you mean by updating loop variables.

We can use size_t instead of unsigned int (its not being used at someplaces), also we can use eigenMatrixx Eigen::Index, in some of the loops.
Thank you for mentioning, i will get back to it.

@github-actions
Copy link
Contributor

Here are the build results
Avogadro2.AppImage
macOS.dmg
Win64.exe
Artifacts will only be retained for 90 days.

@ghost
Copy link
Author

ghost commented Oct 23, 2023

Thanks. There is already a PR for constexpr M_PI #1383 but IIRC there are a few more like DEG_TO_RAD (see avogadro/core/avogadrocore.h)

Hello, after taking your valuable feedback,
I have changed the following avagadrocore.h code as required with many necessary changes. May i submit a new PR, if you may allow?

@ghost ghost closed this by deleting the head repository Oct 23, 2023
@ghutchis
Copy link
Member

Of course you can submit a new PR, thanks.

This pull request was closed.
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.

2 participants