Add folder tree

This commit is contained in:
2025-06-19 23:09:41 +02:00
parent 4e9eacc7b0
commit b39419888b
5 changed files with 291 additions and 17 deletions

View File

@ -165,10 +165,8 @@ fn point_in_triangle(point: Pos2, triangle: [&Vertex; 3]) -> PointInTriangle {
// Normalize the weights.
let weights = areas.map(|area| area / triangle_area);
if cfg!(debug_assertions) {
if weights.into_iter().any(f32::is_nan) {
panic!("weights must not be NaN! {weights:?} {triangle_area:?} {areas:?} {sides:?}");
}
if cfg!(debug_assertions) && weights.into_iter().any(f32::is_nan) {
panic!("weights must not be NaN! {weights:?} {triangle_area:?} {areas:?} {sides:?}");
}
PointInTriangle { inside, weights }