jscript modulo code example
Example 1: js modulo
// The JS % operater is REMAINDER not MODULO
// For modulo behaviour use
function mod(n, m) {
return ((n % m) + m) % m;
}
Example 2: javascript modulo
x = a % b // % is modulo
// The JS % operater is REMAINDER not MODULO
// For modulo behaviour use
function mod(n, m) {
return ((n % m) + m) % m;
}
x = a % b // % is modulo