pub struct StaticFilter { /* private fields */ }Expand description
Precomputed error bounds for a declared coordinate range.
Construct once per model, reuse across every predicate call.
Implementations§
Source§impl StaticFilter
impl StaticFilter
Sourcepub fn new(bound: f64) -> Option<StaticFilter>
pub fn new(bound: f64) -> Option<StaticFilter>
Build bounds valid for coordinates with |x| <= bound.
Returns None for a non-finite or non-positive bound, and for a bound
so large that the derived error bound is not finite: in both cases no
sign could be certified, and returning a filter that always defers
would hide the configuration error. A bound so small that a derived
error bound falls below the normal range is refused as well: the
determinant’s products then underflow, the bound no longer covers the
rounding error, and a bound of zero would certify every nonzero sign.
Source§impl StaticFilter
impl StaticFilter
Sourcepub fn orient2d(self, a: DVec2, b: DVec2, c: DVec2) -> Option<Sign>
pub fn orient2d(self, a: DVec2, b: DVec2, c: DVec2) -> Option<Sign>
Try to settle orient2d with the precomputed bound.
None means “not settled”: either a point lies outside the declared
range, or the determinant is too small for the static bound. The caller
must fall back to the full predicate, which is always correct.
Trait Implementations§
Source§impl Clone for StaticFilter
impl Clone for StaticFilter
Source§fn clone(&self) -> StaticFilter
fn clone(&self) -> StaticFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more