decord/source/3666_getRoundingMethod.js

31 lines
621 B
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 3666
// Function ID: 3667
2026-07-20 16:05:17 +00:00
// Name: getRoundingMethod
// Dependencies: []
2026-08-15 05:55:55 +00:00
// Module 3666 (getRoundingMethod)
2026-07-20 16:05:17 +00:00
arg5.getRoundingMethod = function getRoundingMethod(roundingMethod) {
if (roundingMethod) {
let tmp3 = tmp[roundingMethod];
} else {
2026-07-23 10:11:24 +00:00
tmp3 = tmp[trunc];
2026-07-20 16:05:17 +00:00
}
return tmp3;
};
const obj = {
ceil: Math.ceil,
round: Math.round,
floor: Math.floor,
2026-07-29 08:29:29 +00:00
trunc(result) {
if (result < 0) {
2026-07-20 16:05:17 +00:00
const _Math2 = Math;
2026-07-29 08:29:29 +00:00
let rounded = Math.ceil(result);
2026-07-20 16:05:17 +00:00
} else {
const _Math = Math;
2026-07-29 08:29:29 +00:00
rounded = Math.floor(result);
2026-07-20 16:05:17 +00:00
}
return rounded;
}
};
2026-07-23 10:11:24 +00:00
const trunc = "trunc";