Skip to content

Commit

Permalink
Compute "dinstinct min" based on "identical max"
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Aug 12, 2024
1 parent ba2c744 commit 682fc6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/fj-core/src/validation/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ impl ValidationConfig {
// positives due to floating-point accuracy issues), we can adjust it.
let identical_max_distance = Scalar::from_f64(5e-14);

let distinct_min_distance = Scalar::from_f64(5e-7); // 0.5 µm
// This value can't be smaller than `identical_max_distance`. Otherwise
// we can have distinct points that satisfy this constraint, but must be
// considered identical according to the other.
//
// This factor was chosen pretty arbitrarily and might need to be tuned.
let distinct_min_distance = identical_max_distance * 2.;

Self {
panic_on_error: false,
Expand Down

0 comments on commit 682fc6b

Please sign in to comment.