forked from MapComplete/MapComplete
Fix all the bugs, feature-complete with the non-refactored version
This commit is contained in:
parent
5adc355a48
commit
25f2aa8e92
11 changed files with 467 additions and 99 deletions
11
Utils.ts
11
Utils.ts
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue