mround

1.0.0 • Public • Published

mround

Returns a number rounded to the desired multiple

Description

Similar to the Excel MROUND function

Examples

var mround = require('mround');
console.log(mround(49, 50));
// 50
console.log(mround(49, 100));
// 0
console.log(mround(600, 256));
// 512
console.log(mround(49, -50));
// NaN

Running tests

Run mocha tests with npm test

Readme

Keywords

none

Package Sidebar

Install

npm i mround

Weekly Downloads

49

Version

1.0.0

License

none

Last publish

Collaborators

  • cowchimp