Skip to content

Commit

Permalink
avoid a panic in
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Nov 19, 2024
1 parent a7f8dce commit 92cd297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shape/convex_polyhedron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl ConvexPolyhedron {
/// This explicitly computes the convex hull of the given set of points. Use
/// Returns `None` if the convex hull computation failed.
pub fn from_convex_hull(points: &[Point<Real>]) -> Option<ConvexPolyhedron> {
let (vertices, indices) = crate::transformation::convex_hull(points);
let (vertices, indices) = crate::transformation::try_convex_hull(points).ok()?;
Self::from_convex_mesh(vertices, &indices)
}

Expand Down

0 comments on commit 92cd297

Please sign in to comment.