fix: match scenario 2601 monthly seed progression

This commit is contained in:
2026-08-03 18:56:23 +00:00
parent 2f17584075
commit 58b9a230a7
92 changed files with 3696 additions and 587 deletions
+15
View File
@@ -0,0 +1,15 @@
import { describe, expect, it } from 'vitest';
import { round } from '../src/war/utils.js';
describe('legacy war rounding', () => {
it('matches PHP round() at drifted positive and negative half boundaries', () => {
expect(round(4159.499999999999)).toBe(4160);
expect(round(-4159.499999999999)).toBe(-4160);
});
it('keeps values meaningfully below a half boundary on the lower integer', () => {
expect(round(4159.499999)).toBe(4159);
expect(round(-4159.499999)).toBe(-4159);
});
});