@@ -14,6 +14,7 @@ use crate::geometry::OrientedBoundingBox;
1414use crate :: Point2D ;
1515use rayon:: prelude:: * ;
1616use std:: fmt;
17+ use crate :: nextafter:: nextafter;
1718
1819fn hilbert_curve_partition (
1920 partition : & mut [ usize ] ,
@@ -91,7 +92,7 @@ fn segment_to_segment(min: f64, max: f64, order: usize) -> impl Fn(f64) -> u64 {
9192
9293 // Map max to (2**order-1).
9394 while n <= width * f {
94- f = crate :: nextafter ( f, 0.0 ) ;
95+ f = nextafter ( f, 0.0 ) ;
9596 }
9697
9798 move |v| {
@@ -362,13 +363,13 @@ mod tests {
362363 assert_eq ! ( mapping( 7.0 ) , 6 ) ;
363364 assert_eq ! ( mapping( 8.0 ) , 7 ) ;
364365
365- assert_eq ! ( mapping( crate :: nextafter( 1.0 , f64 :: INFINITY ) ) , 1 ) ;
366- assert_eq ! ( mapping( crate :: nextafter( 2.0 , f64 :: INFINITY ) ) , 2 ) ;
367- assert_eq ! ( mapping( crate :: nextafter( 3.0 , f64 :: INFINITY ) ) , 3 ) ;
368- assert_eq ! ( mapping( crate :: nextafter( 4.0 , f64 :: INFINITY ) ) , 4 ) ;
369- assert_eq ! ( mapping( crate :: nextafter( 5.0 , f64 :: INFINITY ) ) , 5 ) ;
370- assert_eq ! ( mapping( crate :: nextafter( 6.0 , f64 :: INFINITY ) ) , 6 ) ;
371- assert_eq ! ( mapping( crate :: nextafter( 7.0 , f64 :: INFINITY ) ) , 7 ) ;
366+ assert_eq ! ( mapping( nextafter( 1.0 , f64 :: INFINITY ) ) , 1 ) ;
367+ assert_eq ! ( mapping( nextafter( 2.0 , f64 :: INFINITY ) ) , 2 ) ;
368+ assert_eq ! ( mapping( nextafter( 3.0 , f64 :: INFINITY ) ) , 3 ) ;
369+ assert_eq ! ( mapping( nextafter( 4.0 , f64 :: INFINITY ) ) , 4 ) ;
370+ assert_eq ! ( mapping( nextafter( 5.0 , f64 :: INFINITY ) ) , 5 ) ;
371+ assert_eq ! ( mapping( nextafter( 6.0 , f64 :: INFINITY ) ) , 6 ) ;
372+ assert_eq ! ( mapping( nextafter( 7.0 , f64 :: INFINITY ) ) , 7 ) ;
372373 }
373374
374375 #[ test]
0 commit comments