pub struct FiniteFloat<T: Float + Display>(/* private fields */);
Expand description
A finite float cannot contain NaN, +Inf or -Inf values.
We did so in order to be able to implement the Ord
trait.
See e.g. this.
Implementations§
Trait Implementations§
Source§impl<T: Clone + Float + Display> Clone for FiniteFloat<T>
impl<T: Clone + Float + Display> Clone for FiniteFloat<T>
Source§fn clone(&self) -> FiniteFloat<T>
fn clone(&self) -> FiniteFloat<T>
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<T: Float + Display> Ord for FiniteFloat<T>
impl<T: Float + Display> Ord for FiniteFloat<T>
Source§fn cmp(&self, other: &FiniteFloat<T>) -> Ordering
fn cmp(&self, other: &FiniteFloat<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: Float + Display> PartialOrd for FiniteFloat<T>
impl<T: Float + Display> PartialOrd for FiniteFloat<T>
impl<T: Float + Display> Eq for FiniteFloat<T>
impl<T: Float + Display> StructuralPartialEq for FiniteFloat<T>
Auto Trait Implementations§
impl<T> Freeze for FiniteFloat<T>where
T: Freeze,
impl<T> RefUnwindSafe for FiniteFloat<T>where
T: RefUnwindSafe,
impl<T> Send for FiniteFloat<T>where
T: Send,
impl<T> Sync for FiniteFloat<T>where
T: Sync,
impl<T> Unpin for FiniteFloat<T>where
T: Unpin,
impl<T> UnwindSafe for FiniteFloat<T>where
T: UnwindSafe,
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