Struct emath::ordered_float::OrderedFloat
source · pub struct OrderedFloat<T>(pub T);
Expand description
Wraps a floating-point value to add total order and hash.
Possible types for T
are f32
and f64
.
All NaNs are considered equal to each other. The size of zero is ignored.
See also Float
.
Tuple Fields§
§0: T
Implementations§
source§impl<T: Float + Copy> OrderedFloat<T>
impl<T: Float + Copy> OrderedFloat<T>
pub fn into_inner(self) -> T
Trait Implementations§
source§impl<T: Clone> Clone for OrderedFloat<T>
impl<T: Clone> Clone for OrderedFloat<T>
source§fn clone(&self) -> OrderedFloat<T>
fn clone(&self) -> OrderedFloat<T>
Returns a copy 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> From<T> for OrderedFloat<T>
impl<T> From<T> for OrderedFloat<T>
source§impl<T: Float> Hash for OrderedFloat<T>
impl<T: Float> Hash for OrderedFloat<T>
source§impl<T: Float> Ord for OrderedFloat<T>
impl<T: Float> Ord for OrderedFloat<T>
source§impl<T: Float> PartialEq for OrderedFloat<T>
impl<T: Float> PartialEq for OrderedFloat<T>
source§impl<T: Float> PartialOrd for OrderedFloat<T>
impl<T: Float> PartialOrd for OrderedFloat<T>
impl<T: Copy> Copy for OrderedFloat<T>
impl<T: Float> Eq for OrderedFloat<T>
Auto Trait Implementations§
impl<T> Freeze for OrderedFloat<T>where
T: Freeze,
impl<T> RefUnwindSafe for OrderedFloat<T>where
T: RefUnwindSafe,
impl<T> Send for OrderedFloat<T>where
T: Send,
impl<T> Sync for OrderedFloat<T>where
T: Sync,
impl<T> Unpin for OrderedFloat<T>where
T: Unpin,
impl<T> UnwindSafe for OrderedFloat<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)