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

Add mod support #234

Merged
merged 2 commits into from
Oct 10, 2022
Merged

Add mod support #234

merged 2 commits into from
Oct 10, 2022

Conversation

zwimer
Copy link
Contributor

@zwimer zwimer commented Oct 7, 2022

Support for operator% and operator%=

It should be worth noting that % in C++ and % in python are not exact analogs for each other. For example -7%3 gives -1 in C++ and 2 in python. Both are mathematically valid, but python typically also requires the result be positive, it's more of a division remainder. These would only be binding for custom classes / definitions though so I think this is ok to gloss over.

@zwimer
Copy link
Contributor Author

zwimer commented Oct 7, 2022

If merged, documentation would be need to updated in: #229
Or if that gets merged first, this would have to update docs in this PR

lyskov
lyskov previously approved these changes Oct 10, 2022
Copy link
Member

@lyskov lyskov left a comment

Choose a reason for hiding this comment

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

Looks good to me, - thank you for putting this together @zwimer !

@lyskov lyskov merged commit d460756 into RosettaCommons:master Oct 10, 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.

2 participants