Package Exports
- round-to-precision
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (round-to-precision) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
round-to-precision
Round a number to a specific precision.
Install
$ npm install --save round-to-precision
Usage
var roundToPrecision = require('round-to-precision');
roundToPrecision(0.25)(0.7);
//=> 0.75
roundToPrecision(0.1)(0.36);
//=> 0.4
Numbers are rounded to a specific precision.
API
roundToPrecision(precision)
Returns a function, wou
roundToSpecificPrecision(value)
Round a value to specific precision.
value
Type: number
precision
Type: number
Number of decimal places.
License
MIT © Dmitriy Semyushkin