Compare commits

..

4 Commits

Author SHA1 Message Date
Simon Bruder 0d316d7aeb Add note on filtering 2023-05-09 23:50:31 +02:00
Simon Bruder a1f8720e74 Add filtering script 2023-05-09 23:50:31 +02:00
Simon Bruder 25e159d96b u02/util: Simplify conditions 2023-05-09 23:50:31 +02:00
Simon Bruder 7e8dbfabea u02: Implement sweep line tool 2023-05-09 23:50:31 +02:00
1 changed files with 2 additions and 2 deletions

View File

@ -516,8 +516,8 @@ TEST_CASE("Sweep line (prop: Barycentric coordinates)") {
}
REQUIRE(pass);
// Crude heuristic:
// No more than differences of all edge point coordinates can fail.
// This ist not accurate (false positives possible) on small/spiky triangles,
// No more than differences of all edge point coordinates can deviate.
// This ist not accurate (false negatives possible) on small/spiky triangles,
// but overall it gives an okayish result.
REQUIRE(deviating < abs(y1 - y0) + abs(y2 - y1) + abs(y0 - y2) +
abs(x1 - x0) + abs(x2 - x1) + abs(x0 - x2));