Skip to content

Commit

Permalink
fix: Fixed kps lower hull bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Saphereye committed Mar 24, 2024
1 parent b1b4a75 commit 7602f43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/algorithms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ pub fn kirk_patrick_seidel(
));
drawing_history.push(upper_hull_history);

let mirrored_points: Vec<Vec2> = points.into_iter().map(|p| Vec2::new(p.x, -p.y)).collect();
// let mirrored_points: Vec<Vec2> = points.into_iter().map(|p| Vec2::new(p.x, -p.y)).collect();
let mut lower_hull_history = vec![];
let lower_hull = lower_hull(mirrored_points, drawing_history);
let lower_hull = lower_hull(points, drawing_history);
// lower_hull.iter_mut().for_each(|p| p.y = -p.y);
for (index, _) in lower_hull.iter().enumerate() {
let j = (index + 1) % lower_hull.len();
Expand Down

0 comments on commit 7602f43

Please sign in to comment.