diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 5fc3cad..bb1e396 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -212,6 +212,8 @@ function Library (ronin) { return Math.round(val / step) * step } + this.floor = Math.floor // round down to the nearest integer + this.min = Math.min this.max = Math.max @@ -224,6 +226,18 @@ function Library (ronin) { this.cos = Math.cos + this.log = Math.log // caclulates on the base of e + + this.pow = (a, b) => { // calculates a^b + return Math.pow(a, b) + } + + this.sqrt = Math.sqrt // calculate the square root + + this.sq = (a) => { // calculate the square + return a * a; + } + this.PI = Math.PI this.TWO_PI = Math.PI * 2