Skip to content

Commit 7e14a94

Browse files
committed
fix clippy
1 parent 9a6d343 commit 7e14a94

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

buzz/src/objectgeo/plane.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Shape for PlaneGeometry {
2828
}
2929

3030
fn bounding_sphere(&self) -> (Vec3, f64) {
31-
(self.origin, std::f64::INFINITY)
31+
(self.origin, f64::INFINITY)
3232
}
3333

3434
fn intersection(&self, ray: &Ray) -> Option<Self::Intersection> {

geo/src/primitive/plane.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ use crate::{v3, Aabb, Vec3};
33

44
/// Return the infinite bounding box of an infinite plane.
55
pub fn bbox() -> Aabb {
6-
use std::f64::{INFINITY, NEG_INFINITY};
7-
8-
Aabb::new(v3(NEG_INFINITY, NEG_INFINITY, NEG_INFINITY))
9-
.expanded(v3(INFINITY, INFINITY, INFINITY))
6+
Aabb::new(v3(f64::NEG_INFINITY, f64::NEG_INFINITY, f64::NEG_INFINITY)).expanded(v3(
7+
f64::INFINITY,
8+
f64::INFINITY,
9+
f64::INFINITY,
10+
))
1011
}
1112

1213
/// Calculate the intersection between an infinite plane defined by a point and

geo/src/spatial_index/kdtree.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ where
6565
&self,
6666
ray: &Ray,
6767
) -> impl Iterator<Item = (&T, <T as Shape>::Intersection)> {
68-
self.root.intersections(ray, 0.0, std::f64::INFINITY)
68+
self.root.intersections(ray, 0.0, f64::INFINITY)
6969
}
7070
}
7171

0 commit comments

Comments
 (0)