Struct font_types::F2Dot14
source · [−]pub struct F2Dot14(_);
Expand description
16-bit signed fixed point number with 14 bits of fraction.
Implementations
sourceimpl F2Dot14
impl F2Dot14
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; 2]
pub fn to_be_bytes(self) -> [u8; 2]
The representation of this number as a big-endian byte array.
Trait Implementations
sourceimpl AddAssign<F2Dot14> for F2Dot14
impl AddAssign<F2Dot14> for F2Dot14
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresourceimpl Ord for F2Dot14
impl Ord for F2Dot14
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<F2Dot14> for F2Dot14
impl PartialOrd<F2Dot14> for F2Dot14
sourcefn partial_cmp(&self, other: &F2Dot14) -> Option<Ordering>
fn partial_cmp(&self, other: &F2Dot14) -> 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<F2Dot14> for F2Dot14
impl SubAssign<F2Dot14> for F2Dot14
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for F2Dot14
impl Eq for F2Dot14
impl StructuralEq for F2Dot14
impl StructuralPartialEq for F2Dot14
Auto Trait Implementations
impl RefUnwindSafe for F2Dot14
impl Send for F2Dot14
impl Sync for F2Dot14
impl Unpin for F2Dot14
impl UnwindSafe for F2Dot14
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