diff --git a/src/isobands.rs b/src/isobands.rs index e4cf6ea..91d4d3d 100644 --- a/src/isobands.rs +++ b/src/isobands.rs @@ -114,7 +114,7 @@ pub(crate) struct Settings { pub max_v: f64, } -static PRECISION: f64 = 1e-4; +static PRECISION: f64 = f64::MIN_POSITIVE; /// Contours generator, using builder pattern, to /// be used on a rectangular `Slice` of values to diff --git a/src/lib.rs b/src/lib.rs index 1727835..6500d4b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -446,27 +446,6 @@ mod tests { assert_eq!( res[0].0, vec![ - vec![ - Point::new(0.9999750000000001, 1.0), - Point::new(1.0, 0.9999750000000001), - Point::new(2.0, 0.9999750000000001), - Point::new(3.0, 0.9999750000000001), - Point::new(4.0, 0.9999750000000001), - Point::new(5.0, 0.9999750000000001), - Point::new(5.000025, 1.0), - Point::new(5.000025, 2.0), - Point::new(5.000025, 3.0), - Point::new(5.000025, 4.0), - Point::new(5.0, 4.000025), - Point::new(4.0, 4.000025), - Point::new(3.0, 4.000025), - Point::new(2.0, 4.000025), - Point::new(1.0, 4.000025), - Point::new(0.9999750000000001, 4.0), - Point::new(0.9999750000000001, 3.0), - Point::new(0.9999750000000001, 2.0), - Point::new(0.9999750000000001, 1.0) - ], vec![ Point::new(1.0, 0.5), Point::new(0.5, 1.0), @@ -486,7 +465,20 @@ mod tests { Point::new(4.0, 0.5), Point::new(3.0, 0.5), Point::new(2.0, 0.5), - Point::new(1.0, 0.5) + Point::new(1.0, 0.5), + ], + vec![ + Point::new(1.0, 2.0), + Point::new(2.0, 1.0), + Point::new(3.0, 1.0), + Point::new(4.0, 1.0), + Point::new(5.0, 2.0), + Point::new(5.0, 3.0), + Point::new(4.0, 4.0), + Point::new(3.0, 4.0), + Point::new(2.0, 4.0), + Point::new(1.0, 3.0), + Point::new(1.0, 2.0), ] ] );