forked from 1b-agent/opencadstudio-upstream
fix: resolve the two clippy approx_constant denies
The informational clippy job fails on two pre-existing literals (also failing on main, surfaced on this PR's merge): the trim tangency test's angle list used 3.14 where pi was meant — use the constant; the point-cloud light-direction fixture in render.rs uses a hand-tuned 0.318 component that only looks like 1/pi — keep the tuned value and allow the lint on that statement.
This commit is contained in:
1 parent
297a4d3074
commit
ec96612388
2 files changed
+4
-1
No files matched your search
@@ -4707,7 +4707,7 @@ mod tests {
|
||||
);
|
||||
|
||||
// 1. External tangency: Test across multiple angles and slight epsilons
|
||||
for angle in [0.0f64, 0.5, 1.0, 1.57, 2.5, 3.14, 4.0, 5.0] {
|
||||
for angle in [0.0f64, 0.5, 1.0, 1.57, 2.5, std::f64::consts::PI, 4.0, 5.0] {
|
||||
for eps in [-1e-8, 0.0, 1e-8] {
|
||||
let dist = 20.0 + eps;
|
||||
let dx = dist * angle.cos();
|
||||
|
||||
Reference in new issue
Block a user