mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-15 03:35:52 +00:00
Consolidate duplicated code
This commit is contained in:
parent
7066f6bc34
commit
dd9b834077
@ -28,10 +28,9 @@ impl SurfaceSurfaceIntersection {
|
|||||||
// coordinates for each surface.
|
// coordinates for each surface.
|
||||||
|
|
||||||
let planes = surfaces.map(|surface| plane_from_surface(&surface));
|
let planes = surfaces.map(|surface| plane_from_surface(&surface));
|
||||||
let [a, b] = planes;
|
|
||||||
|
|
||||||
let (a_distance, a_normal) = a.constant_normal_form();
|
let [(a_distance, a_normal), (b_distance, b_normal)] =
|
||||||
let (b_distance, b_normal) = b.constant_normal_form();
|
planes.map(|plane| plane.constant_normal_form());
|
||||||
|
|
||||||
let direction = a_normal.cross(&b_normal);
|
let direction = a_normal.cross(&b_normal);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user