update test

This commit is contained in:
QIDI TECH
2025-02-10 15:31:36 +08:00
parent 7529de7fe1
commit 748e5f2db2
76 changed files with 9796 additions and 99 deletions

View File

@@ -33,7 +33,7 @@ TEST_CASE("Distance to line", "[Point]") {
TEST_CASE("Distance to diagonal line", "[Point]") {
const Line line{{50, 50}, {125, -25}};
CHECK(std::abs(line.distance_to(Point{100, 0})) == Approx(0));
CHECK_THAT(std::abs(line.distance_to(Point{100, 0})), Catch::Matchers::WithinAbs(0, 1e-6));
}
TEST_CASE("Perp distance to line does not overflow", "[Point]") {