Inline variables

This commit is contained in:
Hanno Braun 2022-11-08 12:35:10 +01:00
parent a902e2522e
commit c71d10893a
1 changed files with 5 additions and 7 deletions

View File

@ -62,22 +62,20 @@ impl CycleBuilder for PartialCycle {
.expect("Need surface position to extend cycle") .expect("Need surface position to extend cycle")
}); });
let from = vertex_prev; previous = Some(vertex_next.clone());
let to = vertex_next;
previous = Some(to.clone());
let curve = Curve::partial() let curve = Curve::partial()
.with_surface(Some(surface.clone())) .with_surface(Some(surface.clone()))
.update_as_line_from_points([position_prev, position_next]); .update_as_line_from_points([position_prev, position_next]);
let [from, to] = let [from, to] = [(0., vertex_prev), (1., vertex_next)].map(
[(0., from), (1., to)].map(|(position, surface_form)| { |(position, surface_form)| {
Vertex::partial() Vertex::partial()
.with_curve(curve.clone()) .with_curve(curve.clone())
.with_position(Some([position])) .with_position(Some([position]))
.with_surface_form(surface_form) .with_surface_form(surface_form)
}); },
);
half_edges.push( half_edges.push(
HalfEdge::partial() HalfEdge::partial()