Files
weave-scope/client/app/scripts/utils/math-utils.js

7 lines
140 B
JavaScript

// http://stackoverflow.com/questions/4467539/javascript-modulo-not-behaving
export function modulo(i, n) {
return ((i % n) + n) % n;
}