fix: preserve behavior under new Clippy lints
Keep the fixed ray direction explicit and simplify a single-element loop.
This commit is contained in:
1 parent
5d69452db3
commit
88b4c5b883
2 files changed
+4
-4
No files matched your search
@@ -179,6 +179,8 @@ fn deepest(a: &solvecraft_geom::Mesh, b: &solvecraft_geom::Mesh, tol: f64) -> f6
|
||||
|
||||
/// Ray parity along a skew direction (no axis-aligned edge hits).
|
||||
fn inside(p: Vec3, tris: &[[Vec3; 3]]) -> bool {
|
||||
// Fixed ray coordinates, not an approximation used to compute Euler's constant.
|
||||
#[allow(clippy::approx_constant)]
|
||||
let dir = Vec3::new(0.577_215_664_9, 0.327_118_441_9, 0.751_891_438_7);
|
||||
let mut n = 0;
|
||||
for [a, b, c] in tris {
|
||||
|
||||
@@ -2765,10 +2765,8 @@ pub fn for_feature(app: &SolveApp, id: u64, marker: Option<usize>) -> Option<Dia
|
||||
if let Some(inp) = d.inputs.first_mut() {
|
||||
inp.items = items.into_iter().map(|index| Sel::Profile { sketch: *sketch, index }).collect();
|
||||
}
|
||||
for (k, v) in [("targets", (!targets.is_empty()).then(|| json!(targets)))] {
|
||||
if let Some(v) = v {
|
||||
d.extra.insert(k.into(), v);
|
||||
}
|
||||
if !targets.is_empty() {
|
||||
d.extra.insert("targets".into(), json!(targets));
|
||||
}
|
||||
d
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user