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
@@ -4823,6 +4823,9 @@ impl Scene {
|
||||
let view = |x: f32, y: f32, z: f32| {
|
||||
(inst.camera.rotation * glam::Vec3::new(x, y, z)).normalize_or(glam::Vec3::Z)
|
||||
};
|
||||
// Hand-tuned light-direction fixture: the `0.318` component only
|
||||
// looks like 1/π, so keep the tuned value verbatim.
|
||||
#[allow(clippy::approx_constant)]
|
||||
let (first, second) = if source > 0.5 {
|
||||
(view(-0.034, 0.987, 0.158), glam::Vec3::ZERO)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user