Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jan 27, 2024
1 parent 49585ad commit 6bcd8ae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/MeshBVH.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ describe( 'Bounds Tree', () => {
const box = new Box3();
bvh.getBoundingBox( box );

expect( box ).toEqual( geom.boundingBox );
// the bvh bounds are expanded slightly to accommodate flighting point error differences
expect( box.min.x ).toBeCloseTo( geom.boundingBox.min.x );
expect( box.min.y ).toBeCloseTo( geom.boundingBox.min.y );
expect( box.min.z ).toBeCloseTo( geom.boundingBox.min.z );

expect( box.max.x ).toBeCloseTo( geom.boundingBox.max.x );
expect( box.max.y ).toBeCloseTo( geom.boundingBox.max.y );
expect( box.max.z ).toBeCloseTo( geom.boundingBox.max.z );

} );

Expand Down

0 comments on commit 6bcd8ae

Please sign in to comment.