how to round number in typescript code example
Example 1: round up number typescript
var n = 4.3;
alert(Math.ceil(n)); //alerts 5
Example 2: round to nearest decimal javascript
function round(value, precision) {
var multiplier = Math.pow(10, precision || 0);
return Math.round(value * multiplier) / multiplier;
}