mround
v1.0.0
Published
Returns a number rounded to the desired multiple
Downloads
330
Readme
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