Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 2, 2023
1 parent 2b89c67 commit 0c83922
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions crates/fj-math/src/plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,7 @@ impl Plane {

/// Project a line into the plane
pub fn project_line(&self, line: &Line<3>) -> Line<2> {
let line_origin_relative_to_plane = line.origin() - self.origin();
let line_origin_in_plane = Point {
coords: Vector::from([
self.u()
.scalar_projection_onto(&line_origin_relative_to_plane),
self.v()
.scalar_projection_onto(&line_origin_relative_to_plane),
]),
};

let line_origin_in_plane = self.project_point(line.origin());
let line_direction_in_plane = self.project_vector(line.direction());

Line::from_origin_and_direction(
Expand Down

0 comments on commit 0c83922

Please sign in to comment.