Division (Whole and Remainder) Is Incorrect

I’m Having a problem with the Division (Whole and Remainder) Node in Blueprint. it will only give the correct answers to one of the outputs of the return value pin, any other pins connected to if seams to receive -1 or +1 from the correct result.

For Example Dividend of 2 and Divisor of 4 the Output Should be Return Value of 2 and Remainder of 0. This is what happens for one of the other nodes connected to the Return Value node but for other node they receive a different incorrect answer.

This is happening on version 4.5.1 of Unreal engine 4

Any chance you can post a screenshot of your blueprint?
I’ve attempted to reproduce but can’t replicate your results.
Also bear in mind that you currently have things around the wrong way with regards dividend and divisor - your example cited above would try to divide 2 by 4, which returns 0 and has the remainder of 2. The tooltip for the node itself appears to be incorrect, which I’ll see about fixing.

Hey thanks for the fast reply here is my set up

its a little messy but i did what you said about swapping the numbers around but the results are still not right i know for a fact that the number going in to the node is 4 so the result should be return value of 2 no remainder and i get that being set to the array you can see in the image but after that i set a variable to the return value as well but for some reason that variable is being set as 0, and it does this no matter what the input number is or the way the node gets it (even if i manually enter it to the node)

Bump…

Test in a new blueprint template or something else similar with a simple blueprint like the following:
link text

This works fine for me - I get expected output for both calls to Print String.
You’ll need to eliminate other areas of your Blueprint to try to ascertain if something else is modifying the variable.

Hey I’m not sure why but putting the node in a function of its own seamed to fix my results not sure why, thanks for the help twiddle :slight_smile:

I actually have noticed that it is not really dividing the dividend by the divisor, but subtracting it, if I put it 8 for the dividend and 7 as the divisor I get 1 as the remainder instead of .142857142857143 as the remainder.
This is engine version 4.8.3