Skip to content

Conversation

@jersonal-com
Copy link
Contributor

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.

Sominemo added a commit that referenced this pull request Apr 30, 2025
@Sominemo Sominemo merged commit 747e52a into Sominemo:master Apr 30, 2025
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