-
Notifications
You must be signed in to change notification settings - Fork 0
floor
Subhajit Sahu edited this page Aug 9, 2022
·
4 revisions
Round down a number to specific precision.
function floor(x, pre)
// x: a number
// pre: to precision (1)
const xnumber = require('extra-number');
xnumber.floor(9.161, 1);
// → 9
xnumber.floor(9.161, 0.01);
// → 9.16
xnumber.floor(9.1617, 0.05);
// → 9.15