Does anybody have any ideas on how to round a number to an integer other than the nearest 1? i.e. round a list of numbers to the nearest 5 or 10?

In Excel, the Floor and Ceiling functions allow the user to set a value called “significance”, but it seems Dynamo’s Math.Floor and Math.Ceiling nodes don’t include those inputs. Has anybody out there had this problem before?

I have a couple of nodes in package Clockwork for rounding that can do exactly what you’re looking for.

Rows 3-5 in the screenshot below:

Excellent! Thanks Andreas, Clockwork to the rescue yet again!

I was reading through the forum and found a little nugget to be very useful and simple for rounding using a formula node. I dont know who mentioned it, but it certainly wasnt me I’m just adding to the knowledge base. you can use a formula node with the formula (Round(a/b, 0))*b picking any rounding you want.

A is your input list and B is the rounding number you want to use. the 0 represents how many digits you want to round to. Its probably always 0 if you are round to a 5 or 10 place.

4 Likes

Those Clockwork nodes do not seem to be there anymore in the year 2021.

@truevis They have relocated to a new home in Math.Functions.Rounding

1 Like