diff options
| author | Denis Chevalier <perso@denischevalier.fr> | 2026-08-10 09:39:23 +0200 |
|---|---|---|
| committer | Denis Chevalier <perso@denischevalier.fr> | 2026-08-10 09:39:23 +0200 |
| commit | 1c8d0c4ef5d4a8a2d2e01c8039308049d33e1b2d (patch) | |
| tree | 90ad314b9085dfa9d45364303e8e7af82b250ebd /lib/assert_aeq.typ | |
| parent | 6eede3a0703e0b8040ad92984053928e47c00c47 (diff) | |
| download | same-1c8d0c4ef5d4a8a2d2e01c8039308049d33e1b2d.tar.gz same-1c8d0c4ef5d4a8a2d2e01c8039308049d33e1b2d.tar.bz2 same-1c8d0c4ef5d4a8a2d2e01c8039308049d33e1b2d.zip | |
Add assertion to check the maths early on, and fix typos
Diffstat (limited to 'lib/assert_aeq.typ')
| -rw-r--r-- | lib/assert_aeq.typ | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/assert_aeq.typ b/lib/assert_aeq.typ new file mode 100644 index 0000000..70b9e64 --- /dev/null +++ b/lib/assert_aeq.typ @@ -0,0 +1,3 @@ +#let assert-aeq(left, right, precision: calc.pow(10, -6)) = { + assert(calc.abs(left - right) < precision) +} |
