Fix all the bugs, feature-complete with the non-refactored version

This commit is contained in:
Pieter Vander Vennet 2020-10-30 00:56:46 +01:00
parent 5adc355a48
commit 25f2aa8e92
11 changed files with 467 additions and 99 deletions

View file

@ -39,6 +39,17 @@ export class Utils {
return "" + i;
}
public static Round(i: number) {
if(i < 0){
return "-" + Utils.Round(-i);
}
const j = "" + Math.floor(i * 10);
if (j.length == 1) {
return "0." + j;
}
return j.substr(0, j.length - 1) + "." + j.substr(j.length - 1, j.length);
}
public static Times(f: ((i: number) => string), count: number): string {
let res = "";
for (let i = 0; i < count; i++) {