You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The round function takes one or two parameters in Python and one parameter in JavaScript. In Flexx, while using round with two parameter in PyWidget, the program does not fail, but in JS Widget it fails.
rounded1=round(number)
# works with one parameter as expected either in Python or JavaScriptrounded2=round(number, decimals)
# doesn't work on JS Widget, but works in PyWidgetrounded3=number.toFixed(decimals)
# as toFixed is a JavaScript method that formats a number, it works on JS Widget,# but with a non-negative parameter and it gives fixed decimal digits
Thanks for the nice catch. I'm sure this is not the last discrepancy to be found :)
Yes, that line is where we could create a function instead of aliasing Math.round. I don't have much free cycles the coming weeks. A PR (by you, or anybody else) is welcome!
The round function takes one or two parameters in Python and one parameter in JavaScript. In Flexx, while using round with two parameter in PyWidget, the program does not fail, but in JS Widget it fails.
From what i see this line may need to be fixed.
The text was updated successfully, but these errors were encountered: