pub struct ToleranceAxisV1 {
pub axis: InputAxis,
pub nominal: f64,
pub nominal_inside_target: bool,
pub near_bound: Option<f64>,
pub far_bound: Option<f64>,
pub near_limiting_boundary: Option<LimitingBoundaryV1>,
pub far_limiting_boundary: Option<LimitingBoundaryV1>,
pub unbounded_in_domain: bool,
pub near_has_no_effect: bool,
pub far_has_no_effect: bool,
pub margin_linear_m: f64,
}Expand description
One axis’s tolerance envelope: how far it may move from its own current value, in EACH
direction independently, before the impact crosses target’s boundary.
§Reading these fields together
- A real bound was found in a direction: that direction’s
_boundfield isSome(verified, in this module’s tests, by re-solving AT the bound via a path independent ofwith_axis/bisect_axisand confirming it sits on the boundary). - Confirmed to stay inside throughout the configured domain:
nominal_inside_targetistrueand the corresponding_boundfield(s) areNone.unbounded_in_domainistrueexactly when this holds in BOTH directions. - The nominal itself does not read as inside
target:nominal_inside_targetisfalse. Neither direction is even searched – both_boundfields areNoneandunbounded_in_domainisfalse, NOTtrue. This is the module’s central distinction; see the module doc’s “The central hazard” section.
Fields§
§axis: InputAxis§nominal: f64This axis’s own current (unperturbed) value, in its own physical unit
(crate::perturbation::axis_meta(axis).kind).
nominal_inside_target: boolWhether the impact, with this axis pinned AT nominal via the identical
with_axis/evaluate reconstruction the bisection itself uses for the shared anchor
point, reads as inside target. Correctness requirement 1: bounds are only searched for
when this is true. Virtually always true in ordinary use – perturbing an axis back
to its own current value must reproduce the request’s own nominal impact – false is
reserved for a target with no positive area (a TargetGeometryV1 that cannot contain
any point, not even its own centre); see this module’s tests for how that is exercised
without relying on self-consistency.
near_bound: Option<f64>The bound found searching FROM nominal TOWARD this axis’s configured domain’s lower
bound, or None – see the struct doc for what None means here.
far_bound: Option<f64>The bound found searching FROM nominal TOWARD this axis’s configured domain’s upper
bound, or None – see the struct doc for what None means here.
near_limiting_boundary: Option<LimitingBoundaryV1>Which edge of target near_bound crosses, or None exactly when near_bound is
None.
far_limiting_boundary: Option<LimitingBoundaryV1>Which edge of target far_bound crosses, or None exactly when far_bound is None.
unbounded_in_domain: booltrue exactly when nominal_inside_target is true AND both near_bound and
far_bound are None: the impact is confirmed to stay inside target across the WHOLE
configured domain (subject to bisect_axis’s own one-crossing assumption – see the
module doc). Deliberately NOT simply near_bound.is_none() && far_bound.is_none(): that
would also be true when nominal_inside_target is false, which is the exact
conflation this ticket exists to prevent.
near_has_no_effect: booltrue exactly when near_bound is None AND the impact at the domain’s own lower edge
is indistinguishable (within 1e-9 m on both drop and windage) from the nominal impact:
this axis has NO MEASURABLE EFFECT on the observed impact in this direction at all, as
distinct from an axis that DOES move the impact but never far enough to leave target.
See “TargetDistance cannot answer…” in the module doc for the motivating example
(TargetDistance’s requires_rezero: false means it never affects the impact at a fixed
range_m at all, so unbounded_in_domain: true for it means “this axis is provably
irrelevant here,” not “any error in it is safe”). Always false when near_bound is
Some (a bound exists, so the axis clearly has SOME effect) or nominal_inside_target is
false (the direction was never searched).
far_has_no_effect: boolAs near_has_no_effect, for the far direction.
margin_linear_m: f64The smallest linear half-extent of target (min(height_m, width_m) / 2.0 for a
TargetGeometryV1::Rect, radius_m for a TargetGeometryV1::Circle) – a
convenience summary of how tight the target is, identical across every axis in a report
since it depends only on target.
Trait Implementations§
Source§impl Clone for ToleranceAxisV1
impl Clone for ToleranceAxisV1
Source§fn clone(&self) -> ToleranceAxisV1
fn clone(&self) -> ToleranceAxisV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToleranceAxisV1
impl Debug for ToleranceAxisV1
Source§impl<'de> Deserialize<'de> for ToleranceAxisV1
impl<'de> Deserialize<'de> for ToleranceAxisV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ToleranceAxisV1
impl PartialEq for ToleranceAxisV1
Source§impl Serialize for ToleranceAxisV1
impl Serialize for ToleranceAxisV1
impl StructuralPartialEq for ToleranceAxisV1
Auto Trait Implementations§
impl Freeze for ToleranceAxisV1
impl RefUnwindSafe for ToleranceAxisV1
impl Send for ToleranceAxisV1
impl Sync for ToleranceAxisV1
impl Unpin for ToleranceAxisV1
impl UnsafeUnpin for ToleranceAxisV1
impl UnwindSafe for ToleranceAxisV1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.