% is not modulo, wrong description

When you search modul (blueprint), you obtain the funciton “modulo: %”, but this function is not modulo, it is the remainder of a division. Rest and modulo are equals ONLY IN POSITIVE NUMBERS

For example
-84 mod 360 = 276
-84 % 360 = -84

So no, this is not modulo.

% in C++ is called Modulus and returns the remainder of the division.

This is working as intended, as the Engine’s modulo node returns the same value as the modulo math function in c++. Different programming languages handle modulo differently. Here is another post that discusses this issue, which you may find helpful:

Cheers!

No, C++ % is not modulo, is, again, remainder of a division. If I go to C++ and I write %, I am writing remainder of a division, not modulo.

And even if the name in C++ were modulo, because you use fmodulo, it is still wrong, because your shortnames says “%” not “fmod”.

So at least you could add to the description: Reminder of the division, not mod.

Do you have any resource on why modulo is not the remainder of a division? I googled it and couldn’t find anything reliable, only things like “depends on the implementation for negative numbers”.

Hi, I found this thread while trying to confirm the correct operation for remainders.
As far as I know:

  1. “Mod” IS the operation for getting the remainder. Has been for at least the last 2+ decades, at least in C++

  2. My understanding is that “Modulo” actually refers to the remainder. Wikipedia seems to confirm that as well:
    Modulo operation - Wikipedia

i agree with the other replies here in that it works as intended if you have a problem with it not being positive numbers then just use a absolute node.

Absolute node alone can not help here … You will also have to use a conditional node - if I want to do -4 Modulus 5 it’s not 4, it’s 1. I will have to first check if the number is negative then apply a different calculation.