fix(actions): preserve negative zero in Math.round (M6)

Preserve the sign of negative fractions rounded to zero in the exported HTML player.
This commit is contained in:
Mex authored and GitHub committed 2026-11-15 20:25:24 +01:00
1 parent d439e3e10e
commit f0ecb72dbe
1 file changed
+1
+1
View File
@@ -551,6 +551,7 @@ var AniCraft = (function () {
// Math.round as the Rust evaluator computes it.
function round(x) {
if (!Number.isFinite(x)) return x;
if (x >= -0.5 && x < 0) return -0;
const f = Math.floor(x);
return x - f >= 0.5 ? f + 1 : f;
}