Skip to content

Commit

Permalink
Add tolerances to all Box3dBounds checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Aug 21, 2023
1 parent 877625a commit d6b39b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testBox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@ TEST_CASE(Box3dBounds) {
b = Box::fromRadians(0.25 * PI, -0.25 * PI, 1.25 * PI, 0.25 * PI);
bb = b.getBoundingBox3d();
CHECK(bb.x().getA() == -1);
CHECK(bb.x().getB() >= 0.5 * std::sqrt(2.0));
CHECK(bb.x().getB() >= 0.5 * std::sqrt(2.0) - TOLERANCE);
CHECK(bb.x().getB() <= 0.5 * std::sqrt(2.0) + TOLERANCE);
CHECK(bb.y().getA() >= -0.5 * std::sqrt(2.0) - TOLERANCE);
CHECK(bb.y().getA() <= -0.5 * std::sqrt(2.0));
CHECK(bb.y().getA() <= -0.5 * std::sqrt(2.0) + TOLERANCE);
CHECK(bb.y().getB() == 1);
CHECK(bb.z().getA() >= -0.5 * std::sqrt(2.0) - TOLERANCE);
CHECK(bb.z().getA() <= -0.5 * std::sqrt(2.0));
CHECK(bb.z().getB() >= 0.5 * std::sqrt(2.0));
CHECK(bb.z().getA() <= -0.5 * std::sqrt(2.0) + TOLERANCE);
CHECK(bb.z().getB() >= 0.5 * std::sqrt(2.0) - TOLERANCE);
CHECK(bb.z().getB() <= 0.5 * std::sqrt(2.0) + TOLERANCE);
}

Expand Down

0 comments on commit d6b39b8

Please sign in to comment.