Math Round depending on

Hi,
I want to know the way to achieve that:

If the value is 3.15 i want the value = 4
if the value is 3.95 i want the value = 4 (math,round works fine with that)

Always the double = number. because if i put Math.Round + 1 in the cases 3.95 don’t work for me

Thanks in advance.

Is this fine for you ? using clockwork package

image

Sure its another workarround, but i found a solution only adding “0.5” to the number. always with math round find the next one.

Thanks, i will mark as solved your solution as well.

image

1 Like

Within dynamo there is a Math.Ceiling and a Math.Floor node which rounds the number up or down. It may be worth using that instead.

3 Likes

Oh nice one i will try it too. Thanks @Brendan_Cassidy

Ceiling and Floor are the most correct mathematical solution.

2 Likes