Display rounded number in basic.showNumber (#856)

* use roundWithPrecision in show num er

* fixng typing error

* upgraded pxt version
This commit is contained in:
Peli de Halleux 2018-06-04 22:31:04 -07:00 committed by GitHub
parent 4619dbdd89
commit e6c38b85b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -10,6 +10,6 @@ namespace basic {
//% async
//% parts="ledmatrix" interval.defl=150
export function showNumber(value: number, interval?: number) {
showString(value.toString(), interval);
showString(Math.roundWithPrecision(value, 2).toString(), interval);
}
}

View File

@ -41,6 +41,6 @@
"@types/node": "8.0.53"
},
"dependencies": {
"pxt-core": "3.18.11"
"pxt-core": "3.18.12"
}
}