Skip to content

Commit

Permalink
Merge pull request #59 from lsst/tickets/DM-40456-v24
Browse files Browse the repository at this point in the history
DM-40456-v24: Add tolerances to all Box3dBounds checks
  • Loading branch information
mwittgen authored Oct 5, 2023
2 parents a1cf026 + 4ab619b commit 2f4a71f
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 2f4a71f

Please sign in to comment.