#[repr(transparent)]pub struct NormalizedF32Exclusive(FiniteF32);
Expand description
An immutable f32
that is larger than 0 but less then 1.
Tuple Fields§
§0: FiniteF32
Implementations§
source§impl NormalizedF32Exclusive
impl NormalizedF32Exclusive
sourcepub fn new_bounded(n: f32) -> Self
pub fn new_bounded(n: f32) -> Self
Creates a NormalizedF32Exclusive
clamping the given value.
Returns zero in case of NaN or infinity.
sourcepub fn to_normalized(self) -> NormalizedF32
pub fn to_normalized(self) -> NormalizedF32
Returns the value as a FiniteF32
.
Trait Implementations§
source§impl Clone for NormalizedF32Exclusive
impl Clone for NormalizedF32Exclusive
source§fn clone(&self) -> NormalizedF32Exclusive
fn clone(&self) -> NormalizedF32Exclusive
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 Debug for NormalizedF32Exclusive
impl Debug for NormalizedF32Exclusive
source§impl Default for NormalizedF32Exclusive
impl Default for NormalizedF32Exclusive
source§fn default() -> NormalizedF32Exclusive
fn default() -> NormalizedF32Exclusive
Returns the “default value” for a type. Read more
source§impl Ord for NormalizedF32Exclusive
impl Ord for NormalizedF32Exclusive
source§fn cmp(&self, other: &NormalizedF32Exclusive) -> Ordering
fn cmp(&self, other: &NormalizedF32Exclusive) -> 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 PartialEq for NormalizedF32Exclusive
impl PartialEq for NormalizedF32Exclusive
source§impl PartialOrd for NormalizedF32Exclusive
impl PartialOrd for NormalizedF32Exclusive
impl Copy for NormalizedF32Exclusive
impl Eq for NormalizedF32Exclusive
impl StructuralPartialEq for NormalizedF32Exclusive
Auto Trait Implementations§
impl Freeze for NormalizedF32Exclusive
impl RefUnwindSafe for NormalizedF32Exclusive
impl Send for NormalizedF32Exclusive
impl Sync for NormalizedF32Exclusive
impl Unpin for NormalizedF32Exclusive
impl UnwindSafe for NormalizedF32Exclusive
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
)