Hello,
I understand that you want to know the reason behind the embedded coder’s own function definition instead of the % (modulo)operator usage in generated C/C++ code.
The reason is that when Embedded Coder generates a code for modulo block it also tries to cover some invalid cases such as (0%0 )etc. While as if we use a direct % operator compiler will give an error. Hence after verifying that the inputs are valid then fmod function is used which is the function for performing modulus operation in C.
Hope it helps