fixed-round
Version:
Math.round with fixed, formats a number using fixed-point notation and returns a number.
27 lines (14 loc) • 830 B
Markdown
# fixed-round
> Math.round with fixed, formats a number using fixed-point notation and returns a number.
[](https://travis-ci.org/TCharts/fixed-round) [](https://coveralls.io/github/TCharts/fixed-round) [](https://www.npmjs.com/package/fixed-round) [](https://www.npmjs.com/package/fixed-round)
## Usage
> **npm i --save fixed-round**
```js
var round = require('fixed-round');
// round(number, toFixed);
round(125.34567, 2); // 125.35
round(125.34567); // 125
round(125.34567, -1); // 130
```
## License
ISC@[hustcc](https://github.com/hustcc).