pub struct Number(pub i32);
Expand description
Fixed-width numeric type used in TFM files.
This numeric type has 11 bits for the integer part,
20 bits for the fractional part, and a single signed bit.
The inner value is the number multiplied by 2^20.
It is called a fix_word
in TFtoPL.
In property list files, this type is represented as a decimal number with up to 6 digits after the decimal point. This is a non-lossy representation because 10^(-6) is larger than 2^(-20).
Tuple Fields§
§0: i32
Implementations§
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for Number
impl<'arbitrary> Arbitrary<'arbitrary> for Number
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl From<Number> for DesignSize
impl From<Number> for DesignSize
source§impl Ord for Number
impl Ord for Number
source§impl PartialOrd for Number
impl PartialOrd for Number
impl Copy for Number
impl Eq for Number
impl StructuralPartialEq for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)