Struct font_types::F26Dot6
source · pub struct F26Dot6(/* private fields */);
Expand description
32-bit signed fixed point number with 6 bits of fraction.
Implementations§
source§impl F26Dot6
impl F26Dot6
sourcepub const fn from_bits(bits: i32) -> Self
pub const fn from_bits(bits: i32) -> Self
Creates a new fixed point value from the underlying bit representation.
sourcepub fn wrapping_add(self, other: Self) -> Self
pub fn wrapping_add(self, other: Self) -> Self
Wrapping addition.
sourcepub const fn saturating_add(self, other: Self) -> Self
pub const fn saturating_add(self, other: Self) -> Self
Saturating addition.
sourcepub const fn wrapping_sub(self, other: Self) -> Self
pub const fn wrapping_sub(self, other: Self) -> Self
Wrapping substitution.
sourcepub const fn saturating_sub(self, other: Self) -> Self
pub const fn saturating_sub(self, other: Self) -> Self
Saturating substitution.
sourcepub const fn to_be_bytes(self) -> [u8; 4]
pub const fn to_be_bytes(self) -> [u8; 4]
The representation of this number as a big-endian byte array.
Trait Implementations§
source§impl AddAssign for F26Dot6
impl AddAssign for F26Dot6
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl DivAssign for F26Dot6
impl DivAssign for F26Dot6
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl MulAssign for F26Dot6
impl MulAssign for F26Dot6
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl Ord for F26Dot6
impl Ord for F26Dot6
source§impl PartialEq for F26Dot6
impl PartialEq for F26Dot6
source§impl PartialOrd for F26Dot6
impl PartialOrd for F26Dot6
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 moresource§impl SubAssign for F26Dot6
impl SubAssign for F26Dot6
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for F26Dot6
impl Eq for F26Dot6
impl StructuralPartialEq for F26Dot6
Auto Trait Implementations§
impl Freeze for F26Dot6
impl RefUnwindSafe for F26Dot6
impl Send for F26Dot6
impl Sync for F26Dot6
impl Unpin for F26Dot6
impl UnwindSafe for F26Dot6
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more