Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js modulo

// The JS % operater is REMAINDER not MODULO
// For modulo behaviour use
function mod(n, m) {
  return ((n % m) + m) % m;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #modulo
ADD COMMENT
Topic
Name
4+4 =