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

Added evaluate function for MathComparison classes. #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jersonal-com
Copy link

The fact that MathComparison classes return the left or right side makes it difficult to evalute if they are true or not.

"x < 2 * y" with x:20, y:10 will in any case return 20 - so there is currently no possibility to find out if the comparison is true or not.

This PR implements an evaluate function that returns 1 if the equation is true and 0 if the equation is false.

num has been choosen over bool as a return type as this might open future extensions where the evaluation of an equation is used in other terms.

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.

1 participant