Skip to content

kret13/bankers-round

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bankers round function to reduce the accumulated error. Module written in TS.

Installation

npm i bankers-round --save
yarn add bankers-round

Using

// ES5
var { bankersRound } = require('bankers-round');

// ES6
import { bankersRound } from 'bankers-round';

bankersRound(4.5) //4
bankersRound(5.5) //6
bankersRound(0.045, 2) //0.04
bankersRound(0.055, 2) //0.06

About

Reduce the accumulated error with bankers-round module written in TS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published