floor.js
Floors the given value to the specified number of decimal places.
Install
npm install floor
API
floor(value)
Returns the largest integer less than or equal to value
.
var floor = ; ; // 0; // 4; // 7
floor(value, scale)
Returns the largest integer less than or equal to value
to scale
(+/-) number of decimal places.
var floor = ; ; // 55.5; // 50; // -55.6; // -60 ; // 0; // 10000; // 12000; // 12400; // 12480; // 12489; // 12489.9; // 12489.94; // 12489.948; // 12489.9482; // 12489.9482