Tidied operations to match conventions

This commit is contained in:
Matt C 2017-02-08 17:29:50 +00:00
parent 2750be36da
commit a153246191
4 changed files with 26 additions and 6 deletions

View file

@ -927,8 +927,11 @@ var Utils = {
a[key] = b[key];
return a;
},
/**
* Actual modulo function, since % is actually the remainder function in JS
*
* @author Matt C [matt@artemisbot.pw]
* @param {number} x
* @param {number} y
@ -937,8 +940,10 @@ var Utils = {
return ((x % y) + y) % y;
},
/**
* Finds GCD of two numbers
*
* @author Matt C [matt@artemisbot.pw]
* @param {number} x
* @param {number} y
@ -950,6 +955,14 @@ var Utils = {
return Utils.gcd(y, x % y);
},
/**
* Finds modular inverse of two values
*
* @author Matt C [matt@artemisbot.pw]
* @param {number} x
* @param {number} y
*/
modInv: function(x, y) {
x %= y;
for (var i = 1; i < y; i++) {
@ -959,6 +972,7 @@ var Utils = {
}
},
/**
* A mapping of names of delimiter characters to their symbols.
* @constant