DieselDepot-APP/node_modules/es-toolkit/dist/compat/math/floor.js
SJCoetz def597c157 chore: add generated build artifacts and node module type files
add all Next.js build outputs and third-party dependency type declaration files
2026-07-20 01:18:42 +02:00

19 lines
546 B
JavaScript

const require_decimalAdjust = require("../_internal/decimalAdjust.js");
//#region src/compat/math/floor.ts
/**
* Computes number rounded down to precision.
*
* @param number The number to round down.
* @param precision The precision to round down to.
* @returns Returns the rounded down number.
*
* @example
* floor(4.006); // => 4
* floor(0.046, 2); // => 0.04
* floor(4060, -2); // => 4000
*/
function floor(number, precision = 0) {
return require_decimalAdjust.decimalAdjust("floor", number, precision);
}
//#endregion
exports.floor = floor;