pub struct Fixed(/* private fields */);Implementations§
Source§impl Fixed
impl Fixed
pub const PRECISION: u32
pub const fn new(num: f64) -> Option<Self>
pub const unsafe fn new_unchecked(num: f64) -> Self
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self
pub const fn to_be_bytes(self) -> [u8; 4]
pub const fn frac_num(&self) -> i32
pub const fn get(&self) -> f64
pub const fn round_to_precision(&self) -> f64
Trait Implementations§
impl Copy for Fixed
impl Eq for Fixed
Source§impl Ord for Fixed
impl Ord for Fixed
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Fixed
impl PartialOrd for Fixed
Source§impl PartialOrd<f64> for Fixed
impl PartialOrd<f64> for Fixed
impl StructuralPartialEq for Fixed
Auto Trait Implementations§
impl Freeze for Fixed
impl RefUnwindSafe for Fixed
impl Send for Fixed
impl Sync for Fixed
impl Unpin for Fixed
impl UnsafeUnpin for Fixed
impl UnwindSafe for Fixed
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