Struct font_types::Fixed
source · [−]pub struct Fixed(_);
Expand description
32-bit signed fixed point number with 16 bits of fraction.
Implementations
sourceimpl Fixed
impl Fixed
sourcepub fn wrapping_add(self, other: Self) -> Self
pub fn wrapping_add(self, other: Self) -> Self
Wrapping addition.
sourcepub fn saturating_add(self, other: Self) -> Self
pub fn saturating_add(self, other: Self) -> Self
Saturating addition.
sourcepub fn wrapping_sub(self, other: Self) -> Self
pub fn wrapping_sub(self, other: Self) -> Self
Wrapping substitution.
sourcepub fn saturating_sub(self, other: Self) -> Self
pub fn saturating_sub(self, other: Self) -> Self
Saturating substitution.
sourcepub fn to_be_bytes(self) -> [u8; 4]
pub fn to_be_bytes(self) -> [u8; 4]
The representation of this number as a big-endian byte array.
Trait Implementations
sourceimpl AddAssign<Fixed> for Fixed
impl AddAssign<Fixed> for Fixed
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresourceimpl Ord for Fixed
impl Ord for Fixed
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) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Fixed> for Fixed
impl PartialOrd<Fixed> for Fixed
sourcefn partial_cmp(&self, other: &Fixed) -> Option<Ordering>
fn partial_cmp(&self, other: &Fixed) -> 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 moresourceimpl SubAssign<Fixed> for Fixed
impl SubAssign<Fixed> for Fixed
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for Fixed
impl Eq for Fixed
impl StructuralEq for Fixed
impl StructuralPartialEq for Fixed
Auto Trait Implementations
impl RefUnwindSafe for Fixed
impl Send for Fixed
impl Sync for Fixed
impl Unpin for Fixed
impl UnwindSafe for Fixed
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