Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failing locally #11

Open
casey-speer opened this issue Apr 9, 2017 · 1 comment
Open

Tests failing locally #11

casey-speer opened this issue Apr 9, 2017 · 1 comment

Comments

@casey-speer
Copy link

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
Copy link
Owner

Sorry, this is a problem about environmentally dependent floating-point calculation maybe so difficult to resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants