Skip to content

Commit

Permalink
Consolidate redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Sep 12, 2024
1 parent 2c70cc6 commit 0002785
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/fj-core/src/geometry/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down Expand Up @@ -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(),
}
}
Expand Down

0 comments on commit 0002785

Please sign in to comment.