mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 03:48:27 +00:00
Consolidate redundant code
This commit is contained in:
parent
2c70cc6e3a
commit
00027857e1
@ -4,6 +4,8 @@
|
||||
|
||||
use fj_math::{Circle, Line, Point, Scalar, Transform, Vector};
|
||||
|
||||
use super::CurveGeom2;
|
||||
|
||||
/// A path through surface (2D) or global (3D) space
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
|
||||
pub enum Path<const D: usize> {
|
||||
@ -107,7 +109,7 @@ impl<const D: usize> Path<D> {
|
||||
/// Access the origin of the path's coordinate system
|
||||
pub fn origin(&self) -> Point<D> {
|
||||
match self {
|
||||
Self::Circle(circle) => circle.center() + circle.a(),
|
||||
Self::Circle(circle) => circle.origin(),
|
||||
Self::Line(line) => line.origin(),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user