-
Notifications
You must be signed in to change notification settings - Fork 0
ceil
Subhajit Sahu edited this page Aug 9, 2022
·
6 revisions
Round up a number to specific precision.
function ceil(x, pre)
// x: a number
// pre: to precision [1]
const xnumber = require('extra-number');
xnumber.ceil(9.121, 1);
// → 10
xnumber.ceil(9.121, 0.01);
// → 9.13
xnumber.ceil(9.1217, 0.05);
// → 9.15