Skip to content

Commit

Permalink
Return reference from Vertex::global
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jul 21, 2022
1 parent 97274fa commit 7b94db0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/fj-kernel/src/algorithms/sweep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn sweep(
create_non_continuous_side_face(
path,
is_sweep_along_negative_direction,
vertices.map(|vertex| vertex.global()),
vertices.map(|vertex| *vertex.global()),
color,
&mut target,
);
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-kernel/src/objects/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ impl VerticesOfEdge {
pub fn reverse(self) -> Self {
Self(self.0.map(|[a, b]| {
[
Vertex::new(-b.position(), b.global()),
Vertex::new(-a.position(), a.global()),
Vertex::new(-b.position(), *b.global()),
Vertex::new(-a.position(), *a.global()),
]
}))
}
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-kernel/src/objects/vertex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Vertex {
}

/// The global form of this vertex
pub fn global(&self) -> GlobalVertex {
self.global
pub fn global(&self) -> &GlobalVertex {
&self.global
}
}

0 comments on commit 7b94db0

Please sign in to comment.