How to int() in a math node


How do I use an int() in the math node? The formula for the node is 31+int($row$/6).

I could use 3 nodes. the first for $row$/6, another to convert the double to an integer, and then a third to +31.

Surely there is an easier way?


I would switch to


Hi @TigerCole,

If the “row” column is already of a numeric type then you can use “round()” function to convert any possible double values to integer in the Math Formula node.

But if the “row” column is not numeric you have to convert it to a numeric type (e.g String to Number) before using it in the Math Formula or as an easier alternative, use the Column Expressions node that @izaychik63 has suggested and use “toInt()” function.



If you want to use our Math Formula Node for this you need to use one of the rounding functions. In the end make sure to check the convert to int button at the end.
I here used floor, but round or ceil of course is also converting to int.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.