Struct rhai::FloatWrapper
source · [−]pub struct FloatWrapper<F>(_);
Expand description
A type that wraps a floating-point number and implements Hash
.
Not available under no_float
.
Implementations
sourceimpl<F: Float> FloatWrapper<F>
impl<F: Float> FloatWrapper<F>
sourcepub const MAX_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E+12f32
pub const MAX_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E+12f32
Maximum floating-point number for natural display before switching to scientific notation.
sourcepub const MIN_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E-14f32
pub const MIN_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E-14f32
Minimum floating-point number for natural display before switching to scientific notation.
sourcepub const fn new(value: F) -> Self
pub const fn new(value: F) -> Self
Create a new FloatWrapper
.
Trait Implementations
sourceimpl<F: Float> AsMut<F> for FloatWrapper<F>
impl<F: Float> AsMut<F> for FloatWrapper<F>
sourceimpl<F: Float> AsRef<F> for FloatWrapper<F>
impl<F: Float> AsRef<F> for FloatWrapper<F>
sourceimpl<F: Clone> Clone for FloatWrapper<F>
impl<F: Clone> Clone for FloatWrapper<F>
sourcefn clone(&self) -> FloatWrapper<F>
fn clone(&self) -> FloatWrapper<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<F: Float + Debug> Debug for FloatWrapper<F>
impl<F: Float + Debug> Debug for FloatWrapper<F>
sourceimpl<F: Float> Deref for FloatWrapper<F>
impl<F: Float> Deref for FloatWrapper<F>
sourceimpl<F: Float> DerefMut for FloatWrapper<F>
impl<F: Float> DerefMut for FloatWrapper<F>
sourceimpl<F: Float> From<F> for FloatWrapper<F>
impl<F: Float> From<F> for FloatWrapper<F>
sourceimpl From<FloatWrapper<f64>> for Dynamic
impl From<FloatWrapper<f64>> for Dynamic
sourcefn from(value: FloatWrapper<FLOAT>) -> Self
fn from(value: FloatWrapper<FLOAT>) -> Self
Converts to this type from the input type.
sourceimpl<F: Float + FromStr> FromStr for FloatWrapper<F>
impl<F: Float + FromStr> FromStr for FloatWrapper<F>
sourceimpl Hash for FloatWrapper<FLOAT>
impl Hash for FloatWrapper<FLOAT>
sourceimpl<F: PartialEq> PartialEq<FloatWrapper<F>> for FloatWrapper<F>
impl<F: PartialEq> PartialEq<FloatWrapper<F>> for FloatWrapper<F>
sourcefn eq(&self, other: &FloatWrapper<F>) -> bool
fn eq(&self, other: &FloatWrapper<F>) -> bool
sourceimpl<F: PartialOrd> PartialOrd<FloatWrapper<F>> for FloatWrapper<F>
impl<F: PartialOrd> PartialOrd<FloatWrapper<F>> for FloatWrapper<F>
sourcefn partial_cmp(&self, other: &FloatWrapper<F>) -> Option<Ordering>
fn partial_cmp(&self, other: &FloatWrapper<F>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<F: Copy> Copy for FloatWrapper<F>
impl<F> StructuralPartialEq for FloatWrapper<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for FloatWrapper<F>where
F: RefUnwindSafe,
impl<F> Send for FloatWrapper<F>where
F: Send,
impl<F> Sync for FloatWrapper<F>where
F: Sync,
impl<F> Unpin for FloatWrapper<F>where
F: Unpin,
impl<F> UnwindSafe for FloatWrapper<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more