pub type NormalizedCoord = F2Dot14;
Expand description
Type for a normalized variation coordinate.
Aliased Type§
struct NormalizedCoord(/* private fields */);
Implementations
Source§impl F2Dot14
impl F2Dot14
Sourcepub const fn from_bits(bits: i16) -> F2Dot14
pub const fn from_bits(bits: i16) -> F2Dot14
Creates a new fixed point value from the underlying bit representation.
Sourcepub const fn floor(self) -> F2Dot14
pub const fn floor(self) -> F2Dot14
Returns the largest integer less than or equal to the number.
Sourcepub fn wrapping_add(self, other: F2Dot14) -> F2Dot14
pub fn wrapping_add(self, other: F2Dot14) -> F2Dot14
Wrapping addition.
Sourcepub const fn saturating_add(self, other: F2Dot14) -> F2Dot14
pub const fn saturating_add(self, other: F2Dot14) -> F2Dot14
Saturating addition.
Sourcepub fn checked_add(self, other: F2Dot14) -> Option<F2Dot14>
pub fn checked_add(self, other: F2Dot14) -> Option<F2Dot14>
Checked addition.
Sourcepub const fn wrapping_sub(self, other: F2Dot14) -> F2Dot14
pub const fn wrapping_sub(self, other: F2Dot14) -> F2Dot14
Wrapping substitution.
Sourcepub const fn saturating_sub(self, other: F2Dot14) -> F2Dot14
pub const fn saturating_sub(self, other: F2Dot14) -> F2Dot14
Saturating substitution.
Sourcepub const fn to_be_bytes(self) -> [u8; 2]
pub const fn to_be_bytes(self) -> [u8; 2]
The representation of this number as a big-endian byte array.
Trait Implementations
Source§impl AddAssign for F2Dot14
impl AddAssign for F2Dot14
Source§fn add_assign(&mut self, other: F2Dot14)
fn add_assign(&mut self, other: F2Dot14)
Performs the
+=
operation. Read moreSource§impl FloatItemDeltaTarget for F2Dot14
impl FloatItemDeltaTarget for F2Dot14
fn apply_float_delta(&self, delta: FloatItemDelta) -> f32
Source§impl Ord for F2Dot14
impl Ord for F2Dot14
Source§impl PartialOrd for F2Dot14
impl PartialOrd for F2Dot14
Source§impl Scalar for F2Dot14
impl Scalar for F2Dot14
Source§impl SubAssign for F2Dot14
impl SubAssign for F2Dot14
Source§fn sub_assign(&mut self, other: F2Dot14)
fn sub_assign(&mut self, other: F2Dot14)
Performs the
-=
operation. Read more