Skip to content

Commit

Permalink
fix: Fix faulty envelope computation
Browse files Browse the repository at this point in the history
  • Loading branch information
gschulze committed Nov 20, 2024
1 parent a592a19 commit 78020cd
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/coordinate_transform/tie_points.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::array;
use std::cmp::max;
use std::rc::Rc;

use delaunator::{Point, Triangulation};
Expand Down Expand Up @@ -258,18 +259,10 @@ impl Face {

let mut update_envelope = |coords: &[Coord]| {
for c in coords {
if c.x < min_x {
min_x = c.x;
}
if c.x > min_x {
min_x = c.x;
}
if c.y < min_x {
min_x = c.y;
}
if c.y > min_x {
min_x = c.y;
}
min_x = min_x.min(c.x);
min_y = min_y.min(c.y);
max_x = max_x.max(c.x);
max_y = max_y.max(c.y);
}
};

Expand Down

0 comments on commit 78020cd

Please sign in to comment.