Franciman / plasm

plot your functions with rust and wasm - https://frankplus.github.io/plasm/
MIT License
10 stars 2 forks source link

Floating point numbers and implicit multiplication + is_3d flag #2

Closed Franciman closed 4 years ago

Franciman commented 4 years ago

Hi, with this PR the parser is going to be able to parse floating point numbers and support implicit multiplication syntax e.g. 2x + 3.

Also I added a new flag in Expression that indicates whether it contains the Y variable and thus requires to be rendered in 3d. Please note that in the current version even functions like f = 3y + 1, which could be rendered in 2d are marked as necessitating 3d rendering, this is probably what we want though, since if we want to render that function in 2d we can equally plot f = 3x + 1 and we agreed that it's not actually useful watching functions like f = 3x + 1 rendered in 3d [if you really want to, use the y in place of x and rotate the resulting plot]