Group function arguments to increase clarity

This commit is contained in:
Hanno Braun 2024-08-07 20:28:43 +02:00
parent 9858e41fe2
commit 7b54a176f6

View File

@ -117,24 +117,28 @@ impl ValidationCheck<Shell> for CoincidentHalfEdgesAreNotSiblings {
}
let Some(points_and_distances) = distances(
half_edge_a.clone(),
object
.find_cycle_of_half_edge(half_edge_a)
.unwrap()
.half_edges()
.after(half_edge_a)
.unwrap()
.start_vertex(),
surface_a,
half_edge_b.clone(),
object
.find_cycle_of_half_edge(half_edge_b)
.unwrap()
.half_edges()
.after(half_edge_b)
.unwrap()
.start_vertex(),
surface_b,
(
half_edge_a.clone(),
object
.find_cycle_of_half_edge(half_edge_a)
.unwrap()
.half_edges()
.after(half_edge_a)
.unwrap()
.start_vertex(),
surface_a,
),
(
half_edge_b.clone(),
object
.find_cycle_of_half_edge(half_edge_b)
.unwrap()
.half_edges()
.after(half_edge_b)
.unwrap()
.start_vertex(),
surface_b,
),
geometry,
) else {
// The geometry to compute the distances is not available,
@ -179,12 +183,16 @@ impl ValidationCheck<Shell> for CoincidentHalfEdgesAreNotSiblings {
///
/// Returns an [`Iterator`] of the distance at each sample.
fn distances(
half_edge_a: Handle<HalfEdge>,
end_vertex_a: &Handle<Vertex>,
surface_a: &Handle<Surface>,
half_edge_b: Handle<HalfEdge>,
end_vertex_b: &Handle<Vertex>,
surface_b: &Handle<Surface>,
(half_edge_a, end_vertex_a, surface_a): (
Handle<HalfEdge>,
&Handle<Vertex>,
&Handle<Surface>,
),
(half_edge_b, end_vertex_b, surface_b): (
Handle<HalfEdge>,
&Handle<Vertex>,
&Handle<Surface>,
),
geometry: &Geometry,
) -> Option<Vec<([Point<3>; 2], Scalar)>> {
fn sample(