Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
While cleaning up some code, both in R19 and R20, I noticed I sometimes use a % b to calculate a modulo, and sometimes LModulo(a, b) (where a and b are both Int32 variables or values). Obviously, the LModulo is defined in the Cinema 4D SDK and thus preferred. But what is the benefit of using it over the regular modulus operator, or put differently, what are the cons of using the modulus operator?
a % b
LModulo(a, b)
LModulo
Just wondering.
Hi Daniel, thanks for reaching out us.
With regard to the LModulo function, being it part of the cinema.framework, you can see, by looking at the implementation, that it:
Int32
Int64
The code, available in the framework is:
if (!b) return 0; if (a >= 0) return a % b; a -= (a / b) * b; if (a < 0) a += b; return a;
Cheers, Riccardo
Thanks for the info.