Skip to content

Commit

Permalink
Consolidate duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 17, 2023
1 parent 7066f6b commit dd9b834
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/fj-kernel/src/algorithms/intersect/surface_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ impl SurfaceSurfaceIntersection {
// coordinates for each surface.

let planes = surfaces.map(|surface| plane_from_surface(&surface));
let [a, b] = planes;

let (a_distance, a_normal) = a.constant_normal_form();
let (b_distance, b_normal) = b.constant_normal_form();
let [(a_distance, a_normal), (b_distance, b_normal)] =
planes.map(|plane| plane.constant_normal_form());

let direction = a_normal.cross(&b_normal);

Expand Down

0 comments on commit dd9b834

Please sign in to comment.