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 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl 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 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
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
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>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 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 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