Simplify merge vertices function
This commit is contained in:
parent
4116ba40e5
commit
58cda59b78
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue