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
If I set a param foo = vsketch.Param(0.3, min_value=0.001)
In the gui, I am able to set foo to 0
I didn't come across it until looking into this but there is a symmetrical problem for max_value
I came across this because I wanted to avoid division by zero errors, so I wanted to prevent some values from being 0. I wanted to do it in a generalized way so that I wouldn't have to change depending on how many the decimals parameter so I set the value to 1e-10 and found I was still able to set the parameters to 0 and run into the division by zero error.
I dug into this a little bit I believe rounding is happening somewhere because for example in the case where decimals=1
foo = vsketch.Param(0.3, decimals=1, min_value=0.05) -> stops foo from being foo = vsketch.Param(0.3, decimals=1, min_value=0.049) -> allows the foo to be set to 0.
The text was updated successfully, but these errors were encountered:
If I set a param
foo = vsketch.Param(0.3, min_value=0.001)
In the gui, I am able to set foo to 0
I didn't come across it until looking into this but there is a symmetrical problem for max_value
I came across this because I wanted to avoid division by zero errors, so I wanted to prevent some values from being 0. I wanted to do it in a generalized way so that I wouldn't have to change depending on how many the
decimals
parameter so I set the value to1e-10
and found I was still able to set the parameters to 0 and run into the division by zero error.I dug into this a little bit I believe rounding is happening somewhere because for example in the case where
decimals=1
foo = vsketch.Param(0.3, decimals=1, min_value=0.05)
-> stops foo from beingfoo = vsketch.Param(0.3, decimals=1, min_value=0.049)
-> allows the foo to be set to 0.The text was updated successfully, but these errors were encountered: