Struct tiny_skia_path::NormalizedF32Exclusive
source · [−]#[repr(transparent)]pub struct NormalizedF32Exclusive(_);
Expand description
An immutable f32
that is larger than 0 but less then 1.
Implementations
sourceimpl 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
sourceimpl Clone for NormalizedF32Exclusive
impl Clone for NormalizedF32Exclusive
sourcefn clone(&self) -> NormalizedF32Exclusive
fn clone(&self) -> NormalizedF32Exclusive
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 more
sourceimpl Debug for NormalizedF32Exclusive
impl Debug for NormalizedF32Exclusive
sourceimpl Default for NormalizedF32Exclusive
impl Default for NormalizedF32Exclusive
sourcefn default() -> NormalizedF32Exclusive
fn default() -> NormalizedF32Exclusive
Returns the “default value” for a type. Read more
sourceimpl Ord for NormalizedF32Exclusive
impl Ord for NormalizedF32Exclusive
sourcefn cmp(&self, other: &NormalizedF32Exclusive) -> Ordering
fn cmp(&self, other: &NormalizedF32Exclusive) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<NormalizedF32Exclusive> for NormalizedF32Exclusive
impl PartialEq<NormalizedF32Exclusive> for NormalizedF32Exclusive
sourcefn eq(&self, other: &NormalizedF32Exclusive) -> bool
fn eq(&self, other: &NormalizedF32Exclusive) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<NormalizedF32Exclusive> for NormalizedF32Exclusive
impl PartialOrd<NormalizedF32Exclusive> for NormalizedF32Exclusive
sourcefn partial_cmp(&self, other: &NormalizedF32Exclusive) -> Option<Ordering>
fn partial_cmp(&self, other: &NormalizedF32Exclusive) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
impl Copy for NormalizedF32Exclusive
impl Eq for NormalizedF32Exclusive
impl StructuralEq for NormalizedF32Exclusive
impl StructuralPartialEq for NormalizedF32Exclusive
Auto Trait Implementations
impl RefUnwindSafe for NormalizedF32Exclusive
impl Send for NormalizedF32Exclusive
impl Sync for NormalizedF32Exclusive
impl Unpin for NormalizedF32Exclusive
impl UnwindSafe for NormalizedF32Exclusive
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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