Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
danieledapo committed Aug 30, 2024
1 parent 9a6d343 commit 7e14a94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion buzz/src/objectgeo/plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Shape for PlaneGeometry {
}

fn bounding_sphere(&self) -> (Vec3, f64) {
(self.origin, std::f64::INFINITY)
(self.origin, f64::INFINITY)
}

fn intersection(&self, ray: &Ray) -> Option<Self::Intersection> {
Expand Down
9 changes: 5 additions & 4 deletions geo/src/primitive/plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ use crate::{v3, Aabb, Vec3};

/// Return the infinite bounding box of an infinite plane.
pub fn bbox() -> Aabb {
use std::f64::{INFINITY, NEG_INFINITY};

Aabb::new(v3(NEG_INFINITY, NEG_INFINITY, NEG_INFINITY))
.expanded(v3(INFINITY, INFINITY, INFINITY))
Aabb::new(v3(f64::NEG_INFINITY, f64::NEG_INFINITY, f64::NEG_INFINITY)).expanded(v3(
f64::INFINITY,
f64::INFINITY,
f64::INFINITY,
))
}

/// Calculate the intersection between an infinite plane defined by a point and
Expand Down
2 changes: 1 addition & 1 deletion geo/src/spatial_index/kdtree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ where
&self,
ray: &Ray,
) -> impl Iterator<Item = (&T, <T as Shape>::Intersection)> {
self.root.intersections(ray, 0.0, std::f64::INFINITY)
self.root.intersections(ray, 0.0, f64::INFINITY)
}
}

Expand Down

0 comments on commit 7e14a94

Please sign in to comment.