npm.io
1.0.0 • Published 11 years ago

round-precision

Licence
MIT
Version
1.0.0
Deps
2
Vulns
0
Weekly
0
Stars
3

round-precision Build Status

Round a number to a specified decimal precision

Install

$ npm install --save round-precision

Usage

var roundPrecision = require('round-precision')
roundPrecision(12.34, 1)
//=> 12.3

API

roundPrecision(value, places) -> number
value

Required
Type: number

A finite number to round.

value

Required
Type: number

A non-negative number of integer places.

License

MIT Ben Drucker

Keywords