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§
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<NormalizedF32Exclusive> for NormalizedF32Exclusive
impl PartialEq<NormalizedF32Exclusive> for NormalizedF32Exclusive
source§fn 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 ==.source§impl PartialOrd<NormalizedF32Exclusive> for NormalizedF32Exclusive
impl PartialOrd<NormalizedF32Exclusive> for NormalizedF32Exclusive
source§fn partial_cmp(&self, other: &NormalizedF32Exclusive) -> Option<Ordering>
fn partial_cmp(&self, other: &NormalizedF32Exclusive) -> Option<Ordering>
1.0.0 · source§fn 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