Output of Divide Integer uses Floor... can we get Rounded versions of the Integer math nodes?

Changed my original question after testing.

Currently need to convert ints to floats, divide, and then use a Round node to Divide Ints with Rounding.

Please add some Integer math nodes that instead round the result by default, thanks.

Did a quick test, looks like it uses Floor instead. Instead of rounding to nearest, it just goes to the last integer, so 2.6 becomes 2. Works like a Division node but it tosses the remainder.

Good to know, but it means extra iterations for rounding… would be nice to have integer math nodes that natively use Round instead of Floor.

I realize this is incredibly old, but in case anyone stumbled on this like I am now… this is consistent how integer division works in computer programming across the board. It always truncates the decimal, instead of rounding it, so even 3.99999 becomes 3. It’s important that this be the default behavior because it’s what happens in C++ (which underlies blueprint) and it’s what is expected. Casting is not rounding and should not round.

1 Like

for anyone looking for this…
Round version without float converter (A+(B/2))/B

1 Like