Skip to content

natecavanaugh/rounder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rounder Build Status

Round a number to a specific number of decimal places.

Install

$ npm install --save rounder

Usage

var rounder = require('rounder');

rounder(1.5254325, 2);
//=> 1.53

rounder(1.5254325, 3);
//=> 1.525

API

rounder(value, precision)

value

Required Type: number

The number to round.

precision

Type: number

The number of digits after the decimal point to round to.

License

MIT © Nate Cavanaugh

About

Round a number to a specific number of decimal places.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published