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