newcat / baklavajs

Graph / node editor in the browser using VueJS
http://baklava.tech
MIT License
1.52k stars 113 forks source link

See Previous Bug #327 - Weird Precision Issues persisting with v2.3 #367

Closed sgramsay closed 7 months ago

sgramsay commented 7 months ago

image Output from final Math node outputs incorrect value to displayNode

Uses Version 2.3

newcat commented 7 months ago

Unfortunately, this is a JavaScript or rather a floating point problem. When you type (1.3+10.0)+(1.4+10.5) into a NodeJS/browser console, you'll see the same output. And since the TextInterface just displays the incoming value as a string, there isn't a way around this problem.

If needed, you can create your own interface that shows numbers by rounding them, but I'd consider this out-of-scope for a simple text display interface.