+ initial import

This commit is contained in:
Taegus
2018-12-16 13:33:09 +01:00
commit 554f96387b
47 changed files with 14962 additions and 0 deletions

23
renderer/utils.js Normal file
View File

@@ -0,0 +1,23 @@
class Utils {
constructor() {}
toFixed(x) {
if (Math.abs(x) < 1.0) {
var e = parseInt(x.toString().split('e-')[1]);
if (e) {
x *= Math.pow(10,e-1);
x = '0.' + (new Array(e)).join('0') + x.toString().substring(2);
}
} else {
var e = parseInt(x.toString().split('+')[1]);
if (e > 20) {
e -= 20;
x /= Math.pow(10,e);
x += (new Array(e+1)).join('0');
}
}
return x;
}
}
EthoUtils = new Utils();