pub struct Tolerance {
pub linear: f64,
pub angular: f64,
}Expand description
What a geometric algorithm needs to decide “the same” and “parallel”:
a length and an angle. Derived from the model’s Precision by
Precision::tolerance or from an entity’s own tolerance by the
operation that owns it — never a literal in an algorithm
(docs/DATA-MODEL.md §Tolerances).
use arris_math::{Precision, Tolerance};
let tol: Tolerance = Precision::DEFAULT.tolerance();
assert_eq!(tol.linear, Precision::DEFAULT.default_tolerance);
assert_eq!(tol.angular, Precision::DEFAULT.angular_tolerance);Fields§
§linear: f64Two points closer than this are the same point; a distance below it is zero.
angular: f64Two directions within this angle (radians) are parallel; two surfaces meeting at less than it are tangent.
Implementations§
Trait Implementations§
impl Copy for Tolerance
impl StructuralPartialEq for Tolerance
Auto Trait Implementations§
impl Freeze for Tolerance
impl RefUnwindSafe for Tolerance
impl Send for Tolerance
impl Sync for Tolerance
impl Unpin for Tolerance
impl UnsafeUnpin for Tolerance
impl UnwindSafe for Tolerance
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.