Fix behavior with files with invalid pasp box (with num & den === 0) (fixes #362)

This commit is contained in:
Vanilagy
2026-05-02 14:27:25 +02:00
parent 62dfc5dd1c
commit 9ed21bf9c6
6 changed files with 70 additions and 26 deletions
+2
View File
@@ -938,6 +938,8 @@ export type Rational = {
};
export const simplifyRational = (rational: Rational): Rational => {
assert(Number.isInteger(rational.num));
assert(Number.isInteger(rational.den));
assert(rational.den !== 0);
let a = Math.abs(rational.num);