Tests failing locally
casey-speer opened this issue · 1 comments
casey-speer commented
Looks like some rounding errors:
gridPoint
✓ should return center point of pointy-topped hexagonal grid system
1) should return center point of flat-topped hexagonal grid system
gridPoints
✓ should return sequential gridPoints (pointy-topped)
✓ should return sequential gridPoints (flat-topped)
3 passing (42ms)
1 failing
1) gridPoint should return center point of flat-topped hexagonal grid system:
AssertionError: { props: { type: 'flat-topped', x: 0, y: 0, size: 100 },
gridX: 0,
gridY: 0,
corners:
[ [ 100, 0 ],
[ 50.00000000 deepEqual { corners:
[ [ 100, 0 ],
[ 50.000000000000014, 86.60254037844386 ],
[ -49.99999999999998, 86.60254037844388 ],
+ expected - actual
1.2246467991473532e-14
]
[
-50.00000000000004
- -86.60254037844385
+ -86.60254037844383
]
[
50.000000000000014
-86.60254037844386
at Context.<anonymous> (test/utils.js:177:12)
airtoxin commented
Sorry, this is a problem about environmentally dependent floating-point calculation maybe so difficult to resolve it.