Implement float <-> string conversion (#907)

This commit is contained in:
jberg 2019-09-06 09:04:43 -07:00 committed by Jordan Eldredge
parent 7db16faa63
commit c70abfc6c4
2 changed files with 4 additions and 8 deletions

View file

@ -148,8 +148,6 @@ Set {
"System.seteq",
"System.getmouseposx",
"System.getmouseposy",
"System.floattostring",
"System.stringtofloat",
"System.integertolongtime",
"System.integertotime",
"System.datetotime",

View file

@ -382,14 +382,12 @@ class System extends MakiObject {
return;
}
floattostring(value: number, ndigits: number) {
unimplementedWarning("floattostring");
return;
floattostring(value: number, ndigits: number): string {
return value.toFixed(ndigits).toString();
}
stringtofloat(str: string) {
unimplementedWarning("stringtofloat");
return;
stringtofloat(str: string): number {
return parseFloat(str);
}
integertolongtime(value: number) {