Skip to content

Commit

Permalink
Change value of precision used between two contiguous bands
Browse files Browse the repository at this point in the history
  • Loading branch information
mthh committed Jan 15, 2024
1 parent 7b5ac02 commit 1c3232f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/isobands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 14 additions & 22 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
]
]
);
Expand Down

0 comments on commit 1c3232f

Please sign in to comment.