Node.js examples for Number:Algorithm
Get positive modulus from number
Number.prototype.mod = function(n) { return ((this%n)+n)%n; }