Simplify merge vertices function

This commit is contained in:
Jarrod Doyle 2023-09-22 21:33:04 +01:00
parent 4116ba40e5
commit 58cda59b78
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 1 additions and 8 deletions

View File

@ -117,14 +117,7 @@ impl Brush {
let mut vs: Vec<Vec3> = vec![]; let mut vs: Vec<Vec3> = vec![];
for intersection in &self.raw_vertices { for intersection in &self.raw_vertices {
let point = intersection.get_intersection_point(); let point = intersection.get_intersection_point();
let mut duplicate = false; if !vs.iter().any(|v| v.abs_diff_eq(point, math::EPSILON)) {
for v in &vs {
if v.abs_diff_eq(point, math::EPSILON) {
duplicate = true;
break;
}
}
if !duplicate {
vs.push(point); vs.push(point);
} }
} }