decord/source/4407_truncate.js

28 lines
584 B
JavaScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 4407
2026-07-27 11:26:19 +00:00
// Function ID: 38883
2026-07-20 16:05:17 +00:00
// Name: truncate
2026-07-25 08:10:48 +00:00
// Dependencies: [518, 4408]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 4407 (truncate)
2026-07-20 16:05:17 +00:00
export default function truncate(arg0) {
if ("number" !== typeof arg0) {
if ("bigint" !== tmp) {
2026-07-23 10:11:24 +00:00
let tmp9 = require(518);
2026-07-20 16:05:17 +00:00
const prototype = tmp9.prototype;
tmp9 = new tmp9("argument must be a Number or a BigInt");
throw tmp9;
}
}
if (arg0 < 0) {
2026-07-25 08:10:48 +00:00
let tmp4 = -require(4408) /* floor */(-arg0);
2026-07-20 16:05:17 +00:00
} else {
2026-07-25 08:10:48 +00:00
tmp4 = require(4408) /* floor */(arg0);
2026-07-20 16:05:17 +00:00
}
let num3 = 0;
if (0 !== tmp4) {
num3 = tmp4;
}
return num3;
};