Display rounded number in basic.showNumber (#856)
* use roundWithPrecision in show num er * fixng typing error * upgraded pxt version
This commit is contained in:
parent
4619dbdd89
commit
e6c38b85b0
@ -10,6 +10,6 @@ namespace basic {
|
|||||||
//% async
|
//% async
|
||||||
//% parts="ledmatrix" interval.defl=150
|
//% parts="ledmatrix" interval.defl=150
|
||||||
export function showNumber(value: number, interval?: number) {
|
export function showNumber(value: number, interval?: number) {
|
||||||
showString(value.toString(), interval);
|
showString(Math.roundWithPrecision(value, 2).toString(), interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -41,6 +41,6 @@
|
|||||||
"@types/node": "8.0.53"
|
"@types/node": "8.0.53"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-core": "3.18.11"
|
"pxt-core": "3.18.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user