Skip to content

Commit

Permalink
Simplify argument of private function
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 23, 2024
1 parent 64f7834 commit 7cb44bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/fj-core/src/validate/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fj_math::{Point, Scalar};

use crate::{
geometry::{CurveBoundary, SurfaceGeometry},
objects::{Curve, HalfEdge, Shell, Surface, Vertex},
objects::{Curve, HalfEdge, Shell, Vertex},
queries::{
AllHalfEdgesWithSurface, BoundingVerticesOfHalfEdge, SiblingOfHalfEdge,
},
Expand Down Expand Up @@ -237,7 +237,7 @@ impl ShellValidationError {
half_edge_a.clone(),
&surface_a.geometry(),
half_edge_b.clone(),
surface_b.clone(),
&surface_b.geometry(),
)
.all(|d| d < config.distinct_min_distance)
{
Expand Down Expand Up @@ -361,7 +361,7 @@ fn distances(
edge_a: Handle<HalfEdge>,
surface_a: &SurfaceGeometry,
edge_b: Handle<HalfEdge>,
surface_b: Handle<Surface>,
surface_b: &SurfaceGeometry,
) -> impl Iterator<Item = Scalar> {
fn sample(
percent: f64,
Expand All @@ -383,7 +383,7 @@ fn distances(
for i in 0..sample_count {
let percent = i as f64 * step;
let sample1 = sample(percent, (&edge_a, surface_a));
let sample2 = sample(1.0 - percent, (&edge_b, &surface_b.geometry()));
let sample2 = sample(1.0 - percent, (&edge_b, surface_b));
distances.push(sample1.distance_to(&sample2))
}
distances.into_iter()
Expand Down

0 comments on commit 7cb44bf

Please sign in to comment.