File size: 156 Bytes
87b3b3a
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
/**
 * Always positive modulus
 * @param {int} n Modulus
 * @returns {int} this modulo n
 */
Number.prototype.mod = function(n) {
	return ((this%n)+n)%n;
}