philsupertramp / game-math

C++ library implementing game related math
https://philsupertramp.github.io/game-math/
MIT License
0 stars 0 forks source link

Equation simplificationt #36

Closed philsupertramp closed 3 years ago

philsupertramp commented 3 years ago

Mathematically speaking there's a set of rules which need to be implemented in order to simplify equations.

Functions: Functions with numeric values as left hand nodes can be simplified to numeric nodes

Line operators: Within same tree it is allowed to combine nodes. Same symbols can be simplified as Number*Symbol leaves.

Dot operators: Numeric values can be combined.

Apart from that we also need to figure out scopes. Parentheses set scopes, everything else is in the same scope. We should probably figure out a visualization first, that'll simplify the process a lot