pub struct Tolerance(/* private fields */);Expand description
The tolerance carried by a single vertex, edge or face: the radius within which the entity is considered to lie.
Always finite and non-negative. Operations may only widen it (see
Tolerance::widen) because narrowing a tolerance asserts an accuracy the
geometry does not have.
Implementations§
Source§impl Tolerance
impl Tolerance
Sourcepub fn new(value: f64) -> OgeomResult<Self>
pub fn new(value: f64) -> OgeomResult<Self>
A tolerance of value, clamped up to Tolerance::MIN.
§Errors
OgeomError::Construction if value is not
finite or is negative. A NaN tolerance poisons every comparison it
reaches, so it is rejected at the boundary rather than propagated.
Sourcepub fn widen(self, other: Self) -> Self
pub fn widen(self, other: Self) -> Self
This tolerance widened to at least other.
The only sanctioned way to change a tolerance. Boolean operations grow tolerances as they go; nothing shrinks them.
Trait Implementations§
impl Copy for Tolerance
Source§impl PartialOrd for Tolerance
impl PartialOrd 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