Round node with digit for number < 1?

Hello, are there any constraints with respect to the round node with digit for “Small” numbers

Rounding rules seem broken

I’m on Revit 2020
image

edit: it’s the ending 05 or 25 (whatever the size of the number)

Cordially
christian.stan

not sure if this is what causes the issue but Python rounds away from zero and C# rounds to the nearest even number

1 Like

Hi,
It’s a specificity of IronPython2.7 (or a bug, fixed in Ipy3)

You can use Python3 or System.Math.Round() instead

1 Like

Hi,
in your examples under 2.7 you have the correct rounding
on the other hand not in the 3.4
odd.

I will use python for rounding from now on (with nodes or designscript it doesn’t fit)

edit: the probability of ending up at 3 significant digits after calculations for rounding to 2 digits should be very very low (Don’t waste energy, I found a workaround)
Thanks
Cordially
christian.stan

1 Like