Open Titaniumtown opened 2 years ago
That's a useful snippet, @Titaniumtown! Would you be willing to release it into the public domain so others can benefit from using it? Something like "I hereby release the following code with the CC0/public domain license: [copy and paste the whole function]" would be really helpful. Thank you!
That's a useful snippet, @Titaniumtown! Would you be willing to release it into the public domain so others can benefit from using it? Something like "I hereby release the following code with the CC0/public domain license: [copy and paste the whole function]" would be really helpful. Thank you!
Oh, sure. I really don't like my implementation and i rewrote it and haven't touched it for a very long while. But I can do that... Here you go! https://gist.github.com/Titaniumtown/c181be5d06505e003d8c4d1e372684ff
Now I'm feeling motivated to rewrite this again haha.
Thank you! And no need to fix what's not broken (assuming it's not broken) 😉. But if you do still decide to rewrite it, I have a few basic tests you can copy to get you started: https://github.com/GraphiteEditor/Graphite/blob/2515620a77478e57c255cd7d97c13cc7065dd99d/frontend/wasm/src/editor_api.rs#L829-L840
Current functions like
2sin(x)
,2x^2
, and(2x-1)(3x+1)
will not work as they don't explicitly declare the multiplication via an asterisk. I Made a super hacky function to add these asterisks (https://github.com/Titaniumtown/integral_site/blob/7421549a884eb0b9c1537ec4e3e9196c4d0d6b38/src/misc.rs#L42), but support for this natively would be great!