mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 20:08:30 +00:00
Consolidate redundant code
This commit is contained in:
parent
c8b4c4be96
commit
c205089446
@ -26,11 +26,7 @@ impl SweptCurve {
|
|||||||
pub fn plane_from_points(points: [impl Into<Point<3>>; 3]) -> Self {
|
pub fn plane_from_points(points: [impl Into<Point<3>>; 3]) -> Self {
|
||||||
let [a, b, c] = points.map(Into::into);
|
let [a, b, c] = points.map(Into::into);
|
||||||
|
|
||||||
let (curve, _) = Line::from_points([a, b]);
|
Self::plane_from_coord_system(a, [b - a, c - a])
|
||||||
Self {
|
|
||||||
curve: Box::new(curve),
|
|
||||||
path: c - a,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn v(&self) -> Vector<3> {
|
pub fn v(&self) -> Vector<3> {
|
||||||
|
Loading…
Reference in New Issue
Block a user