|
|
|
@ -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));
|
|
|
|
|