pub struct FloatInterval { /* private fields */ }Expand description
A closed floating-point interval [lo, hi] with outward-rounded arithmetic.
Implements a simplified version of Moore interval arithmetic.
Implementations§
Source§impl FloatInterval
impl FloatInterval
Sourcepub fn try_new(lo: f64, hi: f64) -> Option<Self>
pub fn try_new(lo: f64, hi: f64) -> Option<Self>
Try to create a new interval, returning None if lo > hi.
Sourcepub fn intersect(self, other: Self) -> Option<Self>
pub fn intersect(self, other: Self) -> Option<Self>
Intersection of two intervals, returning None if disjoint.
Sourcepub fn is_subset_of(self, other: Self) -> bool
pub fn is_subset_of(self, other: Self) -> bool
Check if self is a subset of other.
Trait Implementations§
Source§impl Clone for FloatInterval
impl Clone for FloatInterval
Source§fn clone(&self) -> FloatInterval
fn clone(&self) -> FloatInterval
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FloatInterval
impl Debug for FloatInterval
Source§impl Display for FloatInterval
impl Display for FloatInterval
Source§impl PartialEq for FloatInterval
impl PartialEq for FloatInterval
impl Copy for FloatInterval
impl StructuralPartialEq for FloatInterval
Auto Trait Implementations§
impl Freeze for FloatInterval
impl RefUnwindSafe for FloatInterval
impl Send for FloatInterval
impl Sync for FloatInterval
impl Unpin for FloatInterval
impl UnsafeUnpin for FloatInterval
impl UnwindSafe for FloatInterval
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