Make sure triangulation returns valid triangles

This check is currently redundant with what the `Triangle` constructor
already does. The constructor will soon get simplified though, and then
the new check will be necessary.
This commit is contained in:
Hanno Braun 2024-07-29 19:17:11 +02:00
parent d4b880d185
commit 0df27dee0d

View File

@ -53,6 +53,10 @@ pub fn triangulate(
v2.point_surface,
])
.expect("invalid triangle");
assert!(
triangle.is_valid(),
"Expecting triangles created by triangulation to be valid.",
);
let required_winding = match coord_handedness {
Handedness::LeftHanded => Winding::Cw,