Python 'math.ceil(x)'

I am using a custom node in Dynamo. Does the ‘math.ceil(x)’ has a different format that I can round up to 0.5 instead of an integer? So I can input a parameter at different tiers . . . 0.25, 0.5, 0.75

Another option is using a Round.Ceiling+ node . . .

For example:

1.4111 => 1.5
1.5111 => 2.0

I think if you take your number and divide it by the value you want to get to (.5) then ceiling that number and then multiple the round value again you’ll get what you want.

math.Ceiling(10.4/.5) * .5 = 10.5

5 Likes

oh, that’s right. I was thinking in a wrong direction. Thank you!

1 Like